Last active
October 11, 2015 15:58
-
-
Save elclanrs/3883731 to your computer and use it in GitHub Desktop.
Auto-refresh CSS in browser
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
// Copy paste in browser console | |
// F5 to stop interval | |
setInterval(function () { | |
[].filter.call(document.querySelectorAll('link'), function(el) { | |
return !/google|lorempixel/.test(el.href); | |
}).forEach(function (el) { | |
var href = el.href, | |
date = '?' + new Date().getTime(); | |
el.href = /\?/.test(href) ? href.replace(/\?.+/, date) : href + date; | |
}); | |
}, 250); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment