Created
October 20, 2015 03:34
-
-
Save gaarf/678932a7bb0cc425b696 to your computer and use it in GitHub Desktop.
autoreload bookmarklet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){var%20urlWithoutFragment=window.location.href.replace(/%23.*/,'');var%20newWindow=window.open('about:blank','_blank');newWindow.document.write('<!DOCTYPE%20HTML%20PUBLIC%20"-//W3C//DTD%20HTML%204.01%20Frameset//EN"%20"http://www.w3.org/TR/html4/frameset.dtd"><html><head><title>[Autoreload]%20'+urlWithoutFragment+'</title><script%20type="text/javascript">window.addEventListener("load",function(){var%20frame=document.getElementsByTagName("frame")[0];frame.addEventListener("load",function(){window.setTimeout(function(){frame.src=frame.src;},1000);},false);frame.src="'+urlWithoutFragment+'";},false);</script></head><frameset><frame%20src="about:blank"></frameset></html>');newWindow.document.close();})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment