Skip to content

Instantly share code, notes, and snippets.

@tmcls
Created August 24, 2012 08:17
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tmcls/3447413 to your computer and use it in GitHub Desktop.
Save tmcls/3447413 to your computer and use it in GitHub Desktop.
Run this jQuery script to update your css. Be creative and create a bookmarklet from it ;-)
$("link[rel=stylesheet]").each(function(){
var url = $(this).attr('href');
url = url.replace(/\?tcnc=\d+/,'').replace(/\&tcnc=\d+/,'');
url += (url.indexOf('?')>0 ? '&' : '?') + 'tcnc=' + (new Date()).getTime();
$(this).attr('href', url);
console.log('[UPDATED CSS] '+ url);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment