| View previous topic :: View next topic |
| Author |
Message |
n00ge
Joined: 28 Sep 2007 Posts: 24
|
Posted: Tue May 13, 2008 12:29 pm Post subject: Firefox ReCSS |
|
|
I'd like to create a script to run a javascript bookmarklet in Firefox w/out losing focus from my current application. The bookmarklet is:
| Code: | javascript:void(function(){var%20i,a,s;a=document.getElementsByTagName('link');for(i=0;i<a.length;i++){s=a[i];if(!s.href){continue;}
var%20h=s.href.replace(/(&|%5C?)forceReload=\d+/,'');s.href=h+(h.indexOf('?')>=0?'&':'?')+'forceReload='+(new%20Date().valueOf());}})(); |
Is this possible, and does anybody have any suggestions on how to go about doing it? Thanks.
[Moderator's note: JS line split to avoid horizontal scrolling] |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Tue May 13, 2008 1:56 pm Post subject: |
|
|
If you bookmark this script, and run it from your bookmarks/favorites, it should not loose the focus, will it?
I tried a few bookmarklets (favlets) I have in my bookmarks (one displaying an alert box, another changing the page) and in Firefox, I still have the focus in the message area where I type this message. _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
n00ge
Joined: 28 Sep 2007 Posts: 24
|
Posted: Tue May 13, 2008 2:21 pm Post subject: |
|
|
| I'll clarify... I would like to be editing CSS in another application (I use e-texteditor) and run a command w/ autohotkey to refresh the styles in Firefox without losing focus in my editor. Sorry for the confusion. |
|
| Back to top |
|
 |
|