MozillaZine

[Ext] userChrome.js

Announce and Discuss the Latest Theme and Extension Releases.
RaiseMachine

User avatar
 
Posts: 1763
Joined: December 6th, 2004, 6:05 pm
Location: England

Post Posted March 30th, 2006, 1:03 pm

This line puts back the right-hand side close tab button if you ever need to.
Code: Select all
getBrowser().mTabContainer.setAttribute("closebutton", true);
"Doesn't the idea of making nature against the law seem to you a bit... unnatural ?" - Bill Hicks
"Money is the Schrodinger's Cat of economics." - Robert Anton Wilson
"It's not a bug, it's two features having a fight in the pub car-park." - Me

pirlouy

User avatar
 
Posts: 232
Joined: February 11th, 2005, 6:29 am
Location: France

Post Posted March 30th, 2006, 1:33 pm

zeniko wrote:I've added a "Tabs to the Right" snippet which is a little bit more sophisticated (if you open two tabs in a row, the second tab will be to the right of the first one).

NP. But personally, I prefer having tabs always at right. :-)

Zoolcar9

User avatar
 
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)

Post Posted March 30th, 2006, 1:55 pm


Another scripts to replace extensions
  • <a href="data:application/x-javascript;charset=utf-8;base64,KGZ1bmN0aW9uKCkgeyAvL3NldCB0aGUgcHJlZmVyZW5jZXMNCiAgdmFyIHByZWZTdmMgPSBDb21wb25lbnRzLmNsYXNzZXNbIkBtb3ppbGxhLm9yZy9wcmVmZXJlbmNlcy1zZXJ2aWNlOzEiXQ0KICAgICAgICAgICAgICAgICAgLmdldFNlcnZpY2UoQ29tcG9uZW50cy5pbnRlcmZhY2VzLm5zSVByZWZTZXJ2aWNlKTsNCiAgcHJlZlN2YyA9IHByZWZTdmMuZ2V0QnJhbmNoKG51bGwpOw0KICBwcmVmU3ZjLnNldEJvb2xQcmVmKCdicm93c2VyLmRvd25sb2FkLmZpbGVuYW1lX2Zyb21faHR0cGhlYWRlcicsIHRydWUpDQp9KSgpOw0KDQoNCi8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KICBDb250ZW50IER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BmaWxlc0ZvbGRlciwNCiAgICAgICAgICAgICAgICAgICAgICAgICBwZXJzaXN0QXJncy5jb250ZW50VHlwZSwgZW5jb2RpbmdGbGFncywga1dyYXBDb2x1bW4pOw0KICB9IGVsc2Ugew0KICAgIHRyLmluaXQoKGFDaG9zZW5EYXRhID8gYUNob3NlbkRhdGEudXJpIDogc291cmNlKSwNCiAgICAgICAgICAgIHBlcnNpc3RBcmdzLnRhcmdldCwgIiIsIG51bGwsIG51bGwsIG51bGwsIHBlcnNpc3QpOw0KICAgIHBlcnNpc3QucHJvZ3Jlc3NMaXN0ZW5lciA9IHRyOw0KICAgIHBlcnNpc3Quc2F2ZVVSSSgoYUNob3NlbkRhdGEgPyBhQ2hvc2VuRGF0YS51cmkgOiBzb3VyY2UpLA0KICAgICAgICAgICAgICAgICAgICBudWxsLCBhUmVmZXJyZXIsIHBlcnNpc3RBcmdzLnBvc3REYXRhLCBudWxsLA0KICAgICAgICAgICAgICAgICAgICBwZXJzaXN0QXJncy50YXJnZXQpOw0KICB9DQp9DQo%3D">Content Disposition</a> (extension)
  • <a href="data:application/x-javascript;charset=utf-8;base64,DQovLyBQYXRjaCBmb3IgYnVnIDMyNzYwNCBieSB6ZW5pa28NCg0KKGZ1bmN0aW9uKCkgew0KICB2YXIgYnJvd3NlciA9IGdldEJyb3dzZXIoKTsNCiAgYnJvd3Nlci5fX3ByZTMyNzYwNF9tVGFiUHJvZ3Jlc3NMaXN0ZW5lciA9IGJyb3dzZXIubVRhYlByb2dyZXNzTGlzdGVuZXI7DQogIGJyb3dzZXIubVRhYlByb2dyZXNzTGlzdGVuZXIgPSBmdW5jdGlvbihhVGFiLCBhQnJvd3NlciwgYVN0YXJ0c0JsYW5rKSB7DQogICAgdmFyIGxpc3RlbmVyID0gdGhpcy5fX3ByZTMyNzYwNF9tVGFiUHJvZ3Jlc3NMaXN0ZW5lcihhVGFiLCBhQnJvd3NlciwgYVN0YXJ0c0JsYW5rKTsNCg0KICAgIGxpc3RlbmVy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N0YXR1cyk7DQogICAgICBpZiAoIWxvYWRpbmdEb25lKQ0KICAgICAgew0KICAgICAgICB3aW5kb3cuWFVMQnJvd3NlcldpbmRvdy5vblN0YXR1c0NoYW5nZShicm93c2VyLndlYlByb2dyZXNzLCBudWxsLCAwLCBsaXN0ZW5lci5wTWVzc2FnZSk7DQogICAgICAgIHdpbmRvdy5YVUxCcm93c2VyV2luZG93Lm9uUHJvZ3Jlc3NDaGFuZ2UoYnJvd3Nlci53ZWJQcm9ncmVzcywgMCwgMCwgbGlzdGVuZXIucFRvdGFsUHJvZ3Jlc3MsIDEpOw0KICAgICAgfQ0KICAgIH0sIDApOw0KICB9LCBmYWxzZSk7DQp9KSgpOw0KDQo%3D">Patch for bug 327604</a> (extension)
Last edited by Zoolcar9 on May 7th, 2006, 7:23 am, edited 1 time in total.
My Firefox information | Add-ons | GitHub

"With great power, comes great desire to show it off."

dougeeebear

User avatar
 
Posts: 548
Joined: September 15th, 2005, 4:17 pm

Post Posted March 30th, 2006, 2:16 pm

I can see where I might possibly have several different userChrome.js sub-scripts, and I would like to create a new menu in the menubar to add the separate items to so the tools menu doesn't get too filled up.
Or create a popup sub-menu in the Tools menu to add items to.
Is it possible to do either?

I think I could replace the Edit Config Files extension in this manner.
Last edited by dougeeebear on March 31st, 2006, 5:20 am, edited 5 times in total.

Recall

User avatar
 
Posts: 1686
Joined: November 7th, 2004, 11:07 am
Location: United Kingdom

Post Posted March 30th, 2006, 2:24 pm

could someone make a script for torrents not obeying automatic d/load?

go here http://newvoyages.mine.nu:1701/ and try to d/load one it will pop up the dialogue box no matter whether you save preferences to always open with "torrent program" or not. This happens on most torrent sites

thanks in advance.
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9) Gecko/2008051206 Firefox/3.0

Peng

User avatar
 
Posts: 778
Joined: November 9th, 2004, 2:31 pm
Location: Central Florida

Post Posted March 30th, 2006, 7:34 pm

dougeeebear wrote:I found out if there is a coding mistake anywhere within userChrome.js, none of the scripts work (meaning the script with the mistake plus all other scripts).
You have to physically go and find the file and edit it and correct your mistake before anything will work again.
I guess that means don't make any mistakes.


You might be able to surround each script with a try-catch block, like how the sub-script loader does, except put your script in the try { }.
Hug Peng
(aka Matt Nordhoff)
Check out: Adblock Plus | FoxClocks | OpenBook

dougeeebear

User avatar
 
Posts: 548
Joined: September 15th, 2005, 4:17 pm

Post Posted March 31st, 2006, 5:12 am

Peng wrote:You might be able to surround each script with a try-catch block, like how the sub-script loader does, except put your script in the try { }.


Right now I have these entries in the Tools Menu:

> Edit userChrome.js ... the main script file with multiple tested scripts
> Edit userChrome.jss ... sub-script with multiple tested scripts (I'm using .jss instead of .uc.js)
> Edit SessionManager.jss ... sub-script for Session Manager scripts
> Edit userChrome-TEST.jss ... sub-script used only for testing scripts (one at a time)
> Edit userChrome-EXAMPLES.txt ... for storage of unused scripts
> Open the Chrome Folder

After I test a script in the TEST file and make sure it works properly, I transfer it to userChrome.js or to a sub-script.
This method saves me a lot of problems.

Using this extension is a great way to get some hands-on experience with javascript.

pirlouy

User avatar
 
Posts: 232
Joined: February 11th, 2005, 6:29 am
Location: France

Post Posted April 3rd, 2006, 1:00 pm

Sorry for the off topic but... I'd like to know how you do to have these links:
data:application... ??

XerBlade

User avatar
 
Posts: 865
Joined: October 4th, 2005, 10:45 pm
Location: Nashville, TN, US

Post Posted April 4th, 2006, 4:22 pm

Try this page.
To get what's in the "Content Disposition" link up there, for example:
1) Go to that page.
2) Enter "application/x-javascript;charset=utf-8" next to "Type:".
3) Check "base64".
4) Copy and paste all of the text the "Content Disposition" link brings up into the main text input area.
5) Click Generate.
User Agent
Extensions
AMD64/2.41GHz RAM/1.0GB ATI/256MB-GDDR3/128-bit/8xAGP Cable6.0M/384kbps

pirlouy

User avatar
 
Posts: 232
Joined: February 11th, 2005, 6:29 am
Location: France

Post Posted April 5th, 2006, 4:34 am

Thanks XerBlade.

mrtech

User avatar
 
Posts: 2007
Joined: May 15th, 2003, 7:46 am
Location: New York

Post Posted April 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vbnNlIik7DQogIH0NCn07DQoNCg0KKGZ1bmN0aW9uKCkgew0KICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcigibG9hZCIsIHRydW5jRml4LmluaXQsIGZhbHNlKTsNCiAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoInVubG9hZCIsIHRydW5jRml4LmNsZWFudXAsIGZhbHNlKTsNCn0pKCk7DQoNCg%3D%3D">truncfix</a> (extension by Jonathan Zarate)

<li> Updated version of <a href="data:application/x-javascript;charset=utf-8;base64,LyogIFRoaXMgc2NyaXB0IHdpbGwgYWRkICJFZGl0IHVzZXJDaHJvbWUuanMiIG1lbnVpdGVtIGluDQogICAgTVIgVGVjaCBMb2NhbCBJbnN0YWxsJ3MgRWRpdCBDb25maWcgQnV0dG9uIE1lbnUgICAgICAgICAqLw0KDQooZnVuY3Rpb24oKSB7DQoNCiAgZnVuY3Rpb24gaW5zZXJ0TWVudUl0ZW0odGhpc01lbnVJdGVtSUQsIHRoaXNDbWQpDQogIHsNCiAgICB2YXIgZWRpdENvbmZpZ01lbnUgPSBkb2N1bWVudA0KICAgICAgICAuZ2V0RWxlbWVudEJ5SWQodGhpc01lbnVJdGVtSUQpLmZpcnN0Q2hpbGQ7DQogIA0KICAgIGlmKCFlZGl0Q29uZmlnTWVudSkgcmV0dXJuOw0KDQogICAgdmFyIHVzZXJDaHJvbWVKUyA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoIm1lbnVpdGVtIik7DQogICAgdXNlckNocm9tZUpTLnNldEF0dHJpYnV0ZSgiaWQiLCAidXNlckNocm9tZV9qcyIpOw0KICAgIHVzZXJDaHJvbWVKUy5zZXRBdHRyaWJ1dGUoImxhYmVsIiwgIkVkaXQgdXNlckNocm9tZS5qcyIpOw0KICAgIHVzZXJDaHJvbWVKUy5zZXRBdHRyaWJ1dGUoIm9uY29tbWFuZCIsIHRoaXNDbWQpOw0KICAgIHVzZXJDaHJvbWVKUy5zZXRBdHRyaWJ1dGUoImNsYXNzIiwgIm1lbnVpdGVtLWljb25pYyIpOw0KICAgIHVzZXJDaHJvbWVKUy5zZXRBdHRyaWJ1dGUoImxvY2FsX2luc3RhbGwiLCB0cnVlKTsNCiAgDQogICAgZWRpdENvbmZpZ01lbnUuaW5zZXJ0QmVmb3JlKHVzZXJDaHJvbWVKUywNCiAgICAgIGVkaXRDb25maWdNZW51LmZpcnN0Q2hpbGQpOw0KICB9DQoNCiAgdmFyIGNtZDsNCg0KICBpZih0eXBlb2Ygb3Blbl9wcm9maWxlLmdldFNwZWNpYWxGb2xkZXIgPT0gImZ1bmN0aW9uIikNCiAgICBjbWQgPSAib3Blbl9wcm9maWxlLmZpbGVSdW5Pck9wZW4ob3Blbl9wcm9maWxlLmdldFNwZWNpYWxGb2xkZXIoJ1VDaHJtJyksICd1c2VyQ2hyb21lLmpzJywgJ2xvY2FsX2luc3RhbGwuZGVmYXVsdF9KU19lZGl0b3InLCB0cnVlKTsiDQogIGVsc2UNCiAgICAvL01MVEkgNC41LjEgYW5kIGFib3ZlDQogICAgY21kID0gIm9wZW5fcHJvZmlsZS5maWxlUnVuT3JPcGVuKGxvY2FsX2NvbW1vbi5nZXRTcGVjaWFsRm9sZGVyUGF0aCgnVUNocm0nKSwgJ3VzZXJDaHJvbWUuanMnLCAnbG9jYWxfaW5zdGFsbC5kZWZhdWx0X0pTX2VkaXRvcicsIHRydWUpOyI7DQoNCiAgaW5zZXJ0TWVudUl0ZW0oImVkaXRjb25maWdmaWxlcy10b29sYmFyLWJ1dHRvbiIsIGNtZCk7DQogIGluc2VydE1lbnVJdGVtKCJ0b29sc19lZGl0X215X2NvbmZpZyIsIGNtZCk7DQoNCn0pKCk7DQoNCg%3D%3D">"Adds 'Edit userChrome.js' on MR Tech Local Install's Edit Config button menu"</a>
mel reyes • mrtech.com • BlogPlaxoLinkedInTwitter
Support mrtech.com get our toolbar

logan

User avatar
 
Posts: 3453
Joined: May 22nd, 2003, 3:51 pm
Location: NGC 2403

Post Posted April 9th, 2006, 12:36 pm

Thought I'd add some of my misc. extensions...

<a href="data:application/x-javascript,var%20toolbar%20%3D%20document.getElementById('FindToolbar')%3B%0D%0A%0D%0Aif(toolbar)%20%7B%0D%0A%20%20var%20close%20%3D%20document.getElementById('find-closebutton')%3B%0D%0A%0D%0A%20%20if(close)%20%7B%0D%0A%20%20%20%20toolbar.removeChild(close)%3B%0D%0A%0D%0A%20%20%20%20var%20spacer%20%3D%20document.createElement('spacer')%3B%0D%0A%20%20%20%20spacer.setAttribute('flex'%2C%201)%3B%0D%0A%0D%0A%20%20%20%20toolbar.appendChild(spacer)%3B%0D%0A%20%20%20%20toolbar.appendChild(close)%3B%0D%0A%20%20%7D%0D%0A%7D">Find Close On Right</a>
<a href="data:application/x-javascript,eval('gBrowser.addTab%20%3D'%20%2B%0D%0A%20%20%20%20%20gBrowser.addTab.toString().replace('this.mTabContainer.appendChild(t)%3B'%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'this.mTabContainer.lastChild.removeAttribute(%22last-tab%22)%3B'%20%2B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'this.mTabContainer.appendChild(t)%3B'%20%2B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'this.mTabContainer.firstChild.setAttribute(%22first-tab%22%2C%20%22true%22)%3B'%20%2B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'this.mTabContainer.lastChild.setAttribute(%22last-tab%22%2C%20%22true%22)%3B'))%3B%0D%0A%0D%0Aeval('gBrowser.removeTab%20%3D'%20%2B%0D%0A%20%20%20%20%20gBrowser.removeTab.toString().replace('this.mTabContainer.removeChild(oldTab)%3B'%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'this.mTabContainer.removeChild(oldTab)%3B'%20%2B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'this.mTabContainer.firstChild.setAttribute(%22first-tab%22%2C%20%22true%22)%3B'%20%2B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'this.mTabContainer.lastChild.setAttribute(%22last-tab%22%2C%20%22true%22)%3B'))%3B%0D%0A%0D%0Aeval('gBrowser.moveTabTo%20%3D'%20%2B%0D%0A%20%20%20%20%20gBrowser.moveTabTo.toString().replace('this.mCurrentTab.selected%20%3D%20false%3B'%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'this.mTabContainer.firstChild.removeAttribute(%22first-tab%22)%3B'%20%2B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'this.mTabContainer.lastChild.removeAttribute(%22last-tab%22)%3B'%20%2B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'this.mCurrentTab.selected%20%3D%20false%3B'))%3B%0D%0A%0D%0Aeval('gBrowser.moveTabTo%20%3D'%20%2B%0D%0A%20%20%20%20%20gBrowser.moveTabTo.toString().replace('this.mCurrentTab.selected%20%3D%20true%3B'%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'this.mTabContainer.firstChild.setAttribute(%22first-tab%22%2C%20%22true%22)%3B'%20%2B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'this.mTabContainer.lastChild.setAttribute(%22last-tab%22%2C%20%22true%22)%3B'%20%2B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'this.mCurrentTab.selected%20%3D%20true%3B'))%3B">Update Edge Tab Attributes</a>

They're so small and insignificant, an extension is almost a waste and barely worth the effort. This would be a great builtin, hopefully they take the bug.

edit: removed open tab right, just noticed there were a few others here

alta88
 
Posts: 997
Joined: January 28th, 2006, 3:08 pm

Post Posted April 9th, 2006, 2:22 pm

well i'm pleasantly surprised userchrome.js works in Thunderbird! so far just installed the MTLI Edit Config Menu snippet..

AnonEmoose
 
Posts: 2031
Joined: February 6th, 2004, 11:59 am

Post Posted April 14th, 2006, 8:19 am

zeniko wrote: <a href="data:text/javascript,%2F*%20%3A%3A%3A%3A%3A%3A%3A%3A%20userChrome.xul%20%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%20*%2F%0A%0A(function()%20%7B%0A%09var%20userChrome_xul%20%3D%20Components.classes%5B%22%40mozilla.org%2Ffile%2Fdirectory_service%3B1%22%5D.getService(Components.interfaces.nsIProperties).get(%22UChrm%22%2C%20Components.interfaces.nsILocalFile)%3B%0A%09userChrome_xul.append(%22userChrome.xul%22)%3B%0A%09%0A%09if%20(userChrome_xul.exists())%0A%09%7B%0A%09%09var%20fileURL%20%3D%20Components.classes%5B%22%40mozilla.org%2Fnetwork%2Fio-service%3B1%22%5D.getService(Components.interfaces.nsIIOService).getProtocolHandler(%22file%22).QueryInterface(Components.interfaces.nsIFileProtocolHandler).getURLSpecFromFile(userChrome_xul)%3B%0A%09%09document.loadOverlay(fileURL%2C%20null)%3B%0A%09%7D%0A%7D)()%3B%0A">userChrome.xul</a> (overlays the file userChrome.xul from the profile's chrome folder over the main window)


Expanding on more extended usage of the script above.
1. Copy/create/add the above mentioned file to your chrome folder as userChrome.js (or userChrome.uc.js if you use subscript or import scripts)
2. Create (multiple) customized xul/overlayfile(s) files
3. Create a file (one time) called userChrome.xul like this....
Code: Select all
<!-- Insert a line in this format for EACH custom overlay -->
<?xul-overlay href="optional-path-to-custom-overlay/name-of-Overlay1.xul"?>
<?xul-overlay href="optional-path-to-custom-overlay/name-of-Overlay2.xul"?>



<overlay id="pick-a-name-you-like"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
</overlay>

4. add a line <?xul-overlay href="optional-path-to-custom-overlay/name-of-Overlay1.xul"?> as noted in step 3 for each overlay you wish to add

alta88
 
Posts: 997
Joined: January 28th, 2006, 3:08 pm

Post Posted April 16th, 2006, 12:57 pm

zeniko wrote:This release works for Firefox and Thunderbird 1.0 and newer, Mozilla Suite, SeaMonkey, Netscape and Netscape Browser, Nvu, Sunbird and Flock - about just as long as extensions can be installed.


if netscape (7.2) mail only is selected as default, the script will not run. apparently onLoad doesn't exist in the mail portion. if the browser is then run, the script will also, but will only apply to browser not mail. tried with the MTLI Tools edit userchrome.js menu script; same element names for both Tools menus but only added to browser.

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 1 guest