Created
January 25, 2018 11:27
-
-
Save bdavidxyz/2f6275160800eae136c7db19d5b468bc to your computer and use it in GitHub Desktop.
auto refresh chrome based on url
This file contains hidden or 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
var oldURL = ""; | |
function checkURLchange(currentURL){ | |
if(window.location.href !== localStorage.getItem('oldURL') && !document.body){ | |
oldURL = window.location.href; | |
location.reload(); | |
localStorage.setItem('oldURL', oldURL); | |
} | |
setInterval(function() { | |
checkURLchange(window.location.href); | |
}, 100); | |
} | |
checkURLchange(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment