Advertisement
caffeinatedmike

Attempt #1 pa511cams

Oct 10th, 2018
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.14 KB | None | 0 0
  1. <html>
  2. <head>
  3. <script>
  4. var myCamTimer, myCamTimeout, dial1;
  5. function refreshCamera() {
  6.     var b = new Date;
  7.     a = document.getElementById("myCam");
  8.     a.src = a.src.substring(0, a.src.indexOf("nocache=")) + "nocache=" + b.getTime()
  9. }
  10. function startCamRefresh() {
  11.     clearInterval(myCamTimer);
  12.     clearTimeout(myCamTimeout);
  13.     myCamTimer = setInterval(function() {
  14.         refreshCamera()
  15.     }, 5e3);
  16.     myCamTimeout = setTimeout(function() {
  17.         stopCamRefresh()
  18.     }, 65e3);
  19.     try {
  20.         document.getElementById("camRefLink").style.visibility = "hidden";
  21.     } catch (a) {}
  22. }
  23. function stopCamRefresh() {
  24.     clearInterval(myCamTimer);
  25.     clearTimeout(myCamTimeout);
  26.     try {
  27.         document.getElementById("camRefLink").style.visibility = "visible";
  28.     } catch (a) {}
  29. }
  30. </script>
  31. </head>
  32. <body onload=startCamRefresh()>
  33.  
  34. <img id="myCam" style="height:240px;width:352px;"
  35.     src="https://pa511cams.ilchost.com/cameras/d6/CAM-06-470.jpg?nocache=1539188740869"
  36.      title="cam image - US 1 NB at Old Lincoln Highway">
  37. <div id="camRefLink" style="visibility:hidden">Stream Timed Out</div>
  38. </body>
  39. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement