Code: Select all
getBrowser().mTabContainer.setAttribute("closebutton", true);
Code: Select all
getBrowser().mTabContainer.setAttribute("closebutton", true);
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.
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 { }.
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)
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>
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.