could anyone help me with this please?
thanks in advance

sort greasemonkey user-scripts alphabetically
7 posts
• Page 1 of 1
I've been looking through Google and www.userscripts.org for a script that lets you sort your user-scripts alphabetically, but I can't find any script that lets you do that [under the 'Manage User Scripts' page].
could anyone help me with this please? thanks in advance ![]() That's impossible. User scripts can only change web content. The extension itself would have to be modified. I did find a hack in the GM archives:
http://mozdev.org/pipermail/greasemonke ... 08766.html It hasn't been thoroughly tested so I can't guarantee it won't break something. I tried it and it seems to work but I can't predict what might go wrong. Ah, great! Then we can use userChrome.js script with WindowHook snippet.
Thanks, Grist Last edited by Zoolcar9 on November 20th, 2006, 3:25 pm, edited 1 time in total.
yeah, thanks alot Grist! Just one last question ^^;
do I copy & paste BOTH of those scripts into my userChrome.js, or just one of them? [if 1, which one is it?] If you already have WindowHook snippet in your userChrome.js, you just have to copy the code above. If not, copy both (<a class="postlink" href="data:text/javascript,%2F*%20%3A%3A%3A%3A%3A%3A%3A%3A%20WindowHook%20%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%20*%2F%0A%0Avar%20WindowHook%20%3D%20%7B%0A%09observe%3A%20function(aSubject%2C%20aTopic%2C%20aData)%0A%09%7B%0A%09%09if%20(!aSubject._WindowHook)%0A%09%09%7B%0A%09%09%09aSubject._WindowHook%20%3D%20this%3B%0A%09%09%09aSubject.addEventListener(%22load%22%2C%20this.onLoad_window%2C%20false)%3B%0A%09%09%7D%0A%09%7D%2C%0A%0A%09onLoad_window%3A%20function()%0A%09%7B%0A%09%09this.removeEventListener(%22load%22%2C%20this._WindowHook.onLoad_window%2C%20false)%3B%0A%09%09var%20funcs%20%3D%20this._WindowHook.mFuncs%5Bthis.document.location.href%5D%20%7C%7C%20null%3B%0A%09%09if%20(funcs)%0A%09%09%7B%0A%09%09%09funcs.forEach(function(aFunc)%20%7B%20aFunc(this)%3B%20%7D%2C%20this)%3B%0A%09%09%7D%0A%09%09delete%20this._WindowHook%3B%0A%09%7D%2C%0A%0A%09register%3A%20function(aURL%2C%20aFunc)%0A%09%7B%0A%09%09if%20(!this.mFuncs)%0A%09%09%7B%0A%09%09%09this.mFuncs%20%3D%20%7B%7D%3B%0A%09%09%09Components.classes%5B%22%40mozilla.org%2Fobserver-service%3B1%22%5D.getService(Components.interfaces.nsIObserverService).addObserver(this%2C%20%22domwindowopened%22%2C%20false)%3B%0A%09%09%7D%0A%09%09if%20(!this.mFuncs%5BaURL%5D)%0A%09%09%7B%0A%09%09%09this.mFuncs%5BaURL%5D%20%3D%20%5B%5D%3B%0A%09%09%7D%0A%09%09this.mFuncs%5BaURL%5D.push(aFunc)%3B%0A%09%7D%0A%7D%3B%0A">WindowHook</a> first, then the above code).
7 posts
• Page 1 of 1
Return to Extension Development Who is onlineUsers browsing this forum: No registered users and 0 guests |
![]() |