Skip to content

Instantly share code, notes, and snippets.

@elclanrs
Last active October 11, 2015 15:58
Show Gist options
  • Save elclanrs/3883731 to your computer and use it in GitHub Desktop.
Save elclanrs/3883731 to your computer and use it in GitHub Desktop.
Auto-refresh CSS in browser
// 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