Skip to content

Instantly share code, notes, and snippets.

@Warry
Created October 27, 2010 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Warry/649096 to your computer and use it in GitHub Desktop.
Save Warry/649096 to your computer and use it in GitHub Desktop.
Modify +R shortcut to refresh only the CSS files
javascript:void(function(){window.addEventListener("keydown",function(e){if(e.metaKey && e.keyCode==82){e.preventDefault();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(/(&amp;|%5C?)forceReload=d+/,'');s.href=h+(h.indexOf('?')>=0?'&amp;':'?')+'forceReload='+(new Date().valueOf())}}return false}})})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment