Updating your embed
The widget embed has been simplified. The script URL is shorter and the separate stylesheet is no longer needed - styling now ships with the script itself.
Your existing embed keeps working. There is no breaking change and no deadline. This update gets you the latest widget build and every improvement shipped from here on.
What changed
Two things:
Script URL - the path has changed from
/js/{widget}/{widget}.jsto/widget/{widget}/{widget}.Stylesheet removed - the
<link>tag pointing tocss/app.csscan be deleted. Styles are now bundled with the script.
How to update
Find your current widget embed and make the following swap.
Remove:
<script src="https://widgets.sportmonks.com/js/livescore/livescore.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://widgets.sportmonks.com/css/app.css">Replace with:
<script src="https://widgets.sportmonks.com/widget/livescore/livescore" type="text/javascript"></script>That is the whole change - one line replaces two.
Using a different widget
The same pattern applies to every widget. Replace the script URL using this structure:
/js/{widget}/{widget}.js
/widget/{widget}/{widget}
For example, for the standings widget:
Remove:
Replace with:
The container <div> that holds the widget does not change.
Ensure your widget is hosted on the domain you have set in your widget settings. This has not changed.
Last updated
Was this helpful?