Posted By

n00ge on 04/05/09


Tagged

css ubiquity


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

mtelligent


ReCSS


 / Published in: JavaScript
 

This snippet is for use w/ Ubiquity.

  1. CmdUtils.CreateCommand({
  2. name: "recss",
  3. description: "Reloads the CSS without reloading the entire page.",
  4. execute: function() {
  5. var i,a,s;
  6. a=Application.activeWindow.activeTab.document.getElementsByTagName('link');
  7. for(i=0; i<a.length; i++){
  8. s=a[i];
  9. if(!s.href){
  10. continue;
  11. }
  12. var h=s.href.replace(/(&|%5C?)forceReload=\d+/,'');
  13. s.href=h+(h.indexOf('?')>=0?'&':'?')+'forceReload='+(new Date().valueOf());
  14. }
  15. }
  16. });

Report this snippet  

You need to login to post a comment.