Basic Implementation

Implement the widget by using the the code below in your site.
<script src="https://widgets.launchmc.com/widget/latency.js" data-server="your-server.launchmc.com"> </script>
In data-server field change “your-server.launchmc.com” to yours.

Customize the widget.

To customize the widget here are the following attributes.
AttributeDefaultOptionsDescription
data-serverRequiredYour server domainThe LaunchMC server domain to test (e.g., “myserver.launchmc.com”)
data-themeautodark, light, autoWidget color theme. Auto detects based on page background
data-initial-count31-10Number of locations to show initially
data-show-copytruetrue, falseShow copy-to-clipboard buttons for server IPs
data-compactfalsetrue, falseUse compact layout for smaller spaces
data-auto-refresh0 (off)SecondsAuto-refresh interval in seconds (0 = disabled)
CORS Notice: The widget makes cross-origin requests to fetch latency data. Make sure your website allows this or use the iframe method for maximum compatibility.

Example code for JS widget customizations

Below is an example on how to use the JS widget with the custom options. As mentioned above.
<script src="https://widgets.launchmc.com/widget/latency.js" data-server="test.launchmc.com" data-theme="dark" data-initial-count="5" data-show-copy="true" data-compact="false" data-auto-refresh="300"> </script>

Iframe Integration

You can additoanlly use iframe to integrate the widget into your site. Using the code below.
<iframe src="https://widgets.launchmc.com/widget/embed?server=your-server.launchmc.com" width="100%" height="400" frameborder="0"> </iframe>
Need help? Join our discord for support.