[Ext] userChrome.js
-
- Posts: 0
- Joined: December 31st, 1969, 5:00 pm
pirlouy wrote:Can a moderator copy Diorser and Sobotnik posts in this thread and lock this one, please ?
Please don't. Versions 0.7 and 0.8 will peacefully coexist at least as long as SeaMonkey 1.1 hasn't been discontinued and as long as scripts for version 0.7 are forward-compatible.
-
- Posts: 243
- Joined: November 9th, 2005, 7:31 pm
Need some help:
I used this script to open New Tabs from Address Bar and Bookmarks. The Address bar thing still works but Bookmarks doesn't (on Minefield)... Can anyone help with:
- Making the bookmarks thing work again
- Making the Bookmarks and History thing work from the 'Sidebar' too
:::::::::For Address Bar::::::::::
eval("BrowserLoadURL = " + BrowserLoadURL.toString().replace("e;", "$& if ((gBrowser.currentURI.spec != 'about:blank' || gBrowser.webProgress.isLoadingDocument) && (!aTriggeringEvent.altKey)) { var tab = gBrowser.addTab(); gBrowser.selectedTab = tab; }"));
::::::: For Bookmarks:::::::::::
eval("BookmarksCommand.openOneBookmark = " + BookmarksCommand.openOneBookmark.toString().replace("open", "if ((gBrowser.currentURI.spec != 'about:blank' || gBrowser.webProgress.isLoadingDocument) && (!/^j/.test(url) && aTargetBrowser != 'window' && aTargetBrowser != 'tab' && aTargetBrowser != 'tabshifted')) { var tab = gBrowser.addTab(); gBrowser.selectedTab = tab; } $&"));
I used this script to open New Tabs from Address Bar and Bookmarks. The Address bar thing still works but Bookmarks doesn't (on Minefield)... Can anyone help with:
- Making the bookmarks thing work again
- Making the Bookmarks and History thing work from the 'Sidebar' too
:::::::::For Address Bar::::::::::
eval("BrowserLoadURL = " + BrowserLoadURL.toString().replace("e;", "$& if ((gBrowser.currentURI.spec != 'about:blank' || gBrowser.webProgress.isLoadingDocument) && (!aTriggeringEvent.altKey)) { var tab = gBrowser.addTab(); gBrowser.selectedTab = tab; }"));
::::::: For Bookmarks:::::::::::
eval("BookmarksCommand.openOneBookmark = " + BookmarksCommand.openOneBookmark.toString().replace("open", "if ((gBrowser.currentURI.spec != 'about:blank' || gBrowser.webProgress.isLoadingDocument) && (!/^j/.test(url) && aTargetBrowser != 'window' && aTargetBrowser != 'tab' && aTargetBrowser != 'tabshifted')) { var tab = gBrowser.addTab(); gBrowser.selectedTab = tab; } $&"));
-
- Posts: 0
- Joined: December 31st, 1969, 5:00 pm
pile0nades wrote:<a href="data:text/javascript;charset=utf-8;base64,dmFyIHN0YXR1c2JhciA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJzdGF0dXMtYmFyIik7DQp2YXIgbWVudWJhciA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJ0b29sYmFyLW1lbnViYXIiKTsNCg0KbWVudWJhci5hcHBlbmRDaGlsZChzdGF0dXNiYXIpOw0Kc3RhdHVzYmFyLnNldEF0dHJpYnV0ZSgic3R5bGUiLCAiLW1vei1hcHBlYXJhbmNlOiB0b29sYmFyOyIpOw0Kc3RhdHVzYmFyLnNldEF0dHJpYnV0ZSgiZmxleCIsICI0MDAiKTs%3D">Status bar in menubar</a>
Moves the status bar into the menu bar for a look like this:
There’s a funny glitch: because the window resizer is part of the status bar (alas, unlike Safari), it has been moved up to the menu bar as well (and is still usable). This is easily circumvented with <code>.statusbar-resizerpanel { display: none; }</code>. I’m not sure, however, how to incorporate that directly into your script. Any idea?
I also noticed another tiny bug: the general menu bar context-menu is still enabled, interfering with a few extensions’ right-click behaviour (such as Stylish). Adding <code>statusbar.contextMenu = null;</code> to your script fixes this.
Thanks.
- onemen
- Posts: 1136
- Joined: October 15th, 2004, 7:48 am
aronin wrote:Need some help:
..... Bookmarks doesn't (on Minefield)... Can anyone help with:
- Making the bookmarks thing work again
- Making the Bookmarks and History thing work from the 'Sidebar' too.......
::::::: For Bookmarks:::::::::::
eval("BookmarksCommand.openOneBookmark = " + BookmarksCommand.openOneBookmark.toString().replace("open", "if ((gBrowser.currentURI.spec != 'about:blank' || gBrowser.webProgress.isLoadingDocument) && (!/^j/.test(url) && aTargetBrowser != 'window' && aTargetBrowser != 'tab' && aTargetBrowser != 'tabshifted')) { var tab = gBrowser.addTab(); gBrowser.selectedTab = tab; } $&"));
use this on Minefield only:
*::::::: For Bookmarks:::::::::::*
eval("PlacesController.prototype.openSelectedNodeIn = " + PlacesController.prototype.openSelectedNodeIn.toString().replace('openUILinkIn(node.uri, aWhere);','var tabBrowser = null, browserWindow = getTopWin(); if (browserWindow) tabBrowser = browserWindow.getBrowser(); if (tabBrowser && (tabBrowser.currentURI.spec != "about:blank" || tabBrowser.webProgress.isLoadingDocument) && (!/^j/.test(node.uri) && aWhere == "current")) aWhere = "tab"; $&'));
-
- Posts: 243
- Joined: November 9th, 2005, 7:31 pm
onemen wrote:aronin wrote:Need some help:
..... Bookmarks doesn't (on Minefield)... Can anyone help with:
- Making the bookmarks thing work again
- Making the Bookmarks and History thing work from the 'Sidebar' too.......
*::::::: For Bookmarks:::::::::::*
eval("PlacesController.prototype.openSelectedNodeIn = " + PlacesController.prototype.openSelectedNodeIn.toString().replace('openUILinkIn(node.uri, aWhere);','var tabBrowser = null, browserWindow = getTopWin(); if (browserWindow) tabBrowser = browserWindow.getBrowser(); if (tabBrowser && (tabBrowser.currentURI.spec != "about:blank" || tabBrowser.webProgress.isLoadingDocument) && (!/^j/.test(node.uri) && aWhere == "current")) aWhere = "tab"; $&'));
Works perfect. Thanks Oneman.
A lot of element ids have changed in the nightlies, especially ones relates to Bookmarks/History. For example I had a few entries in userChrome.css around bookmarks toolbar which no longer work. Is there some place where I can get a list of all the changed element ids or is digging into the Firefox Code the only option?
- onemen
- Posts: 1136
- Joined: October 15th, 2004, 7:48 am
- genericFFuser
- Posts: 37
- Joined: November 8th, 2005, 2:47 am
- Location: Bugmenot account is not allowed
I was pointed here from the Firefox Support board and am not Javascript savvy by any stretch. Please forgive me if I'm being stupid, here.
I have a toolbar (from the StockTicker extension) that I want to have enabled each time I open a new window (or when I restart my browser), regardless of whether or not that toolbar was checked on or off in the toolbar controls. It's to remind me that I should periodically check my poverty, but I occasionally am running in places where it's annoying/improper, I turn it off, and forget to turn back on again.
I don't want to keep on changing it with the toolbar controls because past experience has shown that doesn't work. I somehow want New Window (or "new instance of browser") to be smart enough to know that I want that toolbar to be on regardless of what it was last set to. Is that sort of thing possible with the userchrome.js extension? I skimmed through this thread, didn't see anything terribly specific about how to do what I'm after.
I have a toolbar (from the StockTicker extension) that I want to have enabled each time I open a new window (or when I restart my browser), regardless of whether or not that toolbar was checked on or off in the toolbar controls. It's to remind me that I should periodically check my poverty, but I occasionally am running in places where it's annoying/improper, I turn it off, and forget to turn back on again.
I don't want to keep on changing it with the toolbar controls because past experience has shown that doesn't work. I somehow want New Window (or "new instance of browser") to be smart enough to know that I want that toolbar to be on regardless of what it was last set to. Is that sort of thing possible with the userchrome.js extension? I skimmed through this thread, didn't see anything terribly specific about how to do what I'm after.
-
- Posts: 201
- Joined: October 19th, 2007, 4:50 am
- Location: Swiss Confederation
- Contact:
This thread was broken during the Great Dataloss on October 18 and has therefore been replaced:
Go the the new thread.
Go the the new thread.