Created
November 15, 2012 21:48
-
-
Save gigafied/4081536 to your computer and use it in GitHub Desktop.
Bookmarklet to Reload all <link rel="stylesheet"> tags on a given page. No moar CMD + SHIFT + R!!!
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
javascript:(function(){var links = document.getElementsByTagName("link");for (var i = 0; i < links.length; i++) {var link = links[i];if (link.rel === "stylesheet") {var queryString = "";var args = {};var href = link.href;href.replace(/[?&]+([^=&]+)(?:[=]*)([^&]*)/gi, function (m, key, value) {args[key] = value;});args.reload = (new Date()).getTime();for (var p in args) {queryString += (queryString ? "&" : "?") + p + "=" + args[p];}link.href = link.href.replace(/\?.*|$/, queryString);}}}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use this guy.