/ Published in: JavaScript
Why do this?
===========
*hopefully* this will cause the page to refresh and provide a stop button in the future. The idea is to use it while developing in a text editor, as in Vim or its ilk, and not have to alt+tab all the _*flipping*_ time.
For right now its just straight from the source I got it. Additions will be made later.
===========
*hopefully* this will cause the page to refresh and provide a stop button in the future. The idea is to use it while developing in a text editor, as in Vim or its ilk, and not have to alt+tab all the _*flipping*_ time.
For right now its just straight from the source I got it. Additions will be made later.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script> <!-- /* Auto Refresh Page with Time script By JavaScript Kit (javascriptkit.com) Over 200+ free scripts here! */ //enter refresh time in "minutes:seconds" Minutes should range from 0 to inifinity. Seconds should range from 0 to 59 var limit="0:30" if (document.images){ var parselimit=limit.split(":") parselimit=parselimit[0]*60+parselimit[1]*1 } function beginrefresh(){ if (!document.images) return if (parselimit==1) window.location.reload() else{ parselimit-=1 curmin=Math.floor(parselimit/60) cursec=parselimit%60 if (curmin!=0) curtime=curmin+" minutes and "+cursec+" seconds left until page refresh!" else curtime=cursec+" seconds left until page refresh!" window.status=curtime setTimeout("beginrefresh()",1000) } } window.onload=beginrefresh //--> </script>