/ Published in: JavaScript
This snippet is for use w/ Ubiquity.
Expand |
Embed | Plain Text
CmdUtils.CreateCommand({ name: "recss", description: "Reloads the CSS without reloading the entire page.", execute: function() { var i,a,s; a=Application.activeWindow.activeTab.document.getElementsByTagName('link'); for(i=0; i<a.length; i++){ s=a[i]; if(!s.href){ continue; } var h=s.href.replace(/(&|%5C?)forceReload=\d+/,''); s.href=h+(h.indexOf('?')>=0?'&':'?')+'forceReload='+(new Date().valueOf()); } } });
You need to login to post a comment.
