in my website i have embedded accuweather widget:
<a href="http://www.accuweather.com/pl/pl/gdask/275174/weather-forecast/275174" class="aw-widget-legal"></a>
<div id="awcc1459281264171" class="aw-widget-current" style="float:right; width: 479px; height: 180px; margin:12px;" data-locationkey="275174" data-unit="c" data-language="pl" data-useip="false" data-uid="awcc1459281264171"></div><script type="text/javascript" src="http://oap.accuweather.com/launch.js"></script>
today i realized that i didnt pay last internet provider bill and instead of lanunch.js
i got this stuff loaded:
<html>
<head>
<meta http-equiv="refresh" content="2; url=https://ebok.upc.pl/blokada">
<script type="text/javascript">
setTimeout("document.location='https://ebok.upc.pl/blokada';", 1000);
</script>
</head>
<body></body>
</html>
saying internet connection has been blocked. Unfortunatelly this replaced by provider file is generating error on my webpage, and makes it non functional:
Uncaught SyntaxError: Unexpected token < launch.js:1
question is - what would be the best workaround for that? mean how to disable widget if there is no internet connection etc?
thx for all responses