Skip to content

Instantly share code, notes, and snippets.

@ekinertac
Created August 15, 2012 07:55
Show Gist options
  • Save ekinertac/3357471 to your computer and use it in GitHub Desktop.
Save ekinertac/3357471 to your computer and use it in GitHub Desktop.
ReCss.js
$('body').keydown(function(e){
if(e.altKey && e.which == 82){
var i, a, s;
a = document.getElementsByTagName('link');
for (i = 0; i < a.length; i++) {
s = a[i];
if (s.rel.toLowerCase().indexOf('stylesheet') >= 0 && s.href) {
var h = s.href.replace(/(&|%5C?)forceReload=\d+/, '');
s.href = h + (h.indexOf('?') >= 0 ? '&' : '?') + 'forceReload=' + (new Date().valueOf())
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment