[Ext] userChrome.js [support discontinued]
69 posts
• Page 1 of 5 • 1, 2, 3, 4, 5
userChrome.js allows to easily customize Firefox through JavaScript code snippets (see e.g. these code snippet collections as a starting point).
Download/install userChrome.js 0.8 This release works for Firefox and Thunderbird 2 and 3 and all Gecko 1.9 applications. Support: For code related questions, please use the Extension Development forum. Last edited by zeniko on April 19th, 2008, 12:21 am, edited 2 times in total.
Just want to bring this over to the new thread. It's been quite useful to me so hopefully others will think so as well.
<a href="http://deathburger.jottit.com/ucjs">http://deathburger.jottit.com/ucjs</a> i remember that there is a bug that if corrected, this extension would be useless... anyone know the #?
I've found other sites with userChrome.js scripts, and I don't use this page anymore.
http://extensions.geckozone.org/userChrome_js_scripts alice0775 has many useful userChrome.js scripts in her blog http://space.geocities.yahoo.co.jp/gl/alice0775 (JA) (<a href="http://honyaku.yahoofs.jp/url_result?ctw_=sT,eCR-JE,bF,hT,uaHR0cDovL3NwYWNlLmdlb2NpdGllcy55YWhvby5jby5qcC9nbC9hbGljZTA3NzU=,qlang=ja|for=0|sp=-5|fs=100%|fb=0|fi=0|fc=FF0000|db=T|eid=CR-EJ,">Translate to EN</a>) Several scripts don't work anymore with version 3.0 beta 1. This one for example:
Is there a simple solution to have all these scripts compatible.
Not if they're changing IDs at random which is what that looks like. If they are doing that it would be incredibly stupid by the way, it would break many many things that work fine now. I'm not keen on what they've been doing with Firefox by a long shot but I find it hard to believe they could do something that dumb on purpose. Statusbar and menubar IDs have not changed. So the problem is with this kind of scripts.
Can someone advise me on whats wrong with this code? This is on Fx3preB2 nightly builds.
/* ::::::::::::::::::::::::: Places Organizer - Open in Tab ::::::::::::::::::::::::: */ document.getElementsByAttribute("key", "manBookmarkKb")[0].setAttribute("oncommand", '(getBrowser().selectedTab = getBrowser().addTab("chrome://browser/content/places/places.xul")).label = "Places Organizer";');
Someone had once mentioned that there was a bug that, if fixed, would render this extension useless. Maybe they finally got around to fixing it? Some scripts work, so I think the extension works well. It's just the script initialization which should be bad. :/
try something like this to see where it's dying:
var statusbar = document.getElementById("status-bar"); if(!statusbar){alert("Unable to grab statusbar")} var menubar = document.getElementById("nav-bar"); if(!menubar){alert("Unable to grab menubar")} menubar.appendChild(statusbar); There are better ways to debug but that one is quickest for small temporary checks IMO.
WFM with the latest nightly (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b2pre) Gecko/2007112305 Minefield/3.0b2pre) on a clean profile. So either the Beta is borked - or your profile resp. an incompatible extension therein. Besides: Does not working anymore have any other symptoms such as related errors in the Error Console or snippets following that one not working?
It sets an <code>oncommand</code> handler on an element which already sports a <code>command</code> attribute (which AFAICT takes precedence). So you'll either have to modify the <code>Browser:ShowBookmarks</code> command element or remove the <code>command</code> attribute from the menuitem you're working on...
Ok, I tried it a different way and it worked: /* ::::::::::::::::::::::::: Places Library - Open in Tab ::::::::::::::::::::::::: */ document.getElementById("Browser:ShowBookmarks").setAttribute("oncommand", '(getBrowser().selectedTab = getBrowser().addTab("chrome://browser/content/places/places.xul")).label = "Places Organizer";'); But ofcourse, couldn't be without problems: Once I open Places Organizer in Tab ... New Folder command doesn't work anymore (within the organizer). Any ideas? You were both right, deathburger & zeniko.
Some IDs have changed (notably bookmarks) and some scripts were blocking the following ones (console shows me errors). Thanks.
69 posts
Page 1 of 5 • 1, 2, 3, 4, 5
Return to Extension/Theme Releases Who is onlineUsers browsing this forum: No registered users and 0 guests |
![]() |