MozillaZine

[Ext] userChrome.js

Announce and Discuss the Latest Theme and Extension Releases.
dougeeebear

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

Post Posted May 28th, 2006, 12:23 pm

KidReefer wrote:Does this store any other info elsewhere? I wrote a bad code and now have a gray box @ the bottom of my browser. I removed bad script...no luck. Uninstalled/Reinstalled....Nuthin! Even cleared the 3 extension files in my profile. Help! I love this Ext. but now I cant use it.

The grey box is due to a coding error in one of your xul files.
It would be the last one you created/modified.
It will also show you the line that containes the error.

KidReefer

User avatar
 
Posts: 141
Joined: May 7th, 2006, 6:10 am
Location: Earth...mainly

Post Posted May 28th, 2006, 12:52 pm

I didnt see the line w/ the error, that woulda helped. still there after I removed the bad script.
KidReefer wrote:O.K. I removed every file created and reinstalled...it did the trick!! Still weird though....
Is this the only way? Does it write something when I write/add a new script? sumthing like Stylish's rdf file? Either way it now works and all is right in the universe.

old zeniko
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted May 28th, 2006, 12:57 pm

KidReefer wrote:I didnt see the line w/ the error, that woulda helped.

Make sure that you've set the hidden pref javascript.options.showInConsole to true (or check the Chrome button of Console²). Then you should see such error messages in the JS/Error Console. Your issue pretty surely was a XUL overlay gone wild. Anyway, the extension itself doesn't do anything else than running the file userChrome.js for every window - all issues coming from this extension come thus rather from one of the code snippets you added...

KidReefer

User avatar
 
Posts: 141
Joined: May 7th, 2006, 6:10 am
Location: Earth...mainly

Post Posted May 28th, 2006, 2:02 pm

Nice tip., but the problem persisted even after code snippet(a uc.js file) was removed. It just seem like sumthing stuck around. ? .

Peng

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

Post Posted May 28th, 2006, 2:09 pm

Might've messed up localstore.rdf or been cached in XUL.mfl (or XUL.mfasl or XUL FastLoad File, depending on your OS)
Hug Peng
(aka Matt Nordhoff)
Check out: Adblock Plus | FoxClocks | OpenBook

KidReefer

User avatar
 
Posts: 141
Joined: May 7th, 2006, 6:10 am
Location: Earth...mainly

Post Posted May 28th, 2006, 2:49 pm

Interesting.... didnt think to look there. Good to know. Still have the script that was the culprit, maybe I'll try to recreate bug and compare
files....Maybe. BTW I have that pref set @ true for a while now and I didnt see a message. ?

KidReefer

User avatar
 
Posts: 141
Joined: May 7th, 2006, 6:10 am
Location: Earth...mainly

Post Posted May 29th, 2006, 4:30 am

Can statusbar icons be relocated to a toolbar? Whats the best way(s) to learn to write my own scripts? I love the capabilities this has, but dont have a clue where to start. Thanx

DMCrimson
 
Posts: 1025
Joined: February 13th, 2004, 6:11 am

Post Posted May 29th, 2006, 9:40 pm

how to add icon to edit userChrome.xul -menuitem in MTLI's menu? I've tried searching to no avail.

menuitem[id="edit_userChrome.xul"] {
list-style-image: url("chrome://local_install/skin/classic/local_install/edit16x16.png") !important;
}


yields nil.

Zoolcar9

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

Post Posted May 30th, 2006, 5:00 am


<code>id="edit_userChrome_xul"</code>

My Firefox information | Add-ons | GitHub

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

KidReefer

User avatar
 
Posts: 141
Joined: May 7th, 2006, 6:10 am
Location: Earth...mainly

Post Posted May 30th, 2006, 7:16 am

dougeeebear wrote:The grey box is due to a coding error in one of your xul files.
It would be the last one you created/modified.
It will also show you the line that containes the error.
It happend again. this time I open the edit chrome xul with the toolbar menu, which opened my notepad. Didnt enter any text just closed it. Upon restart the gray box was back, I disabled/renabled still there. I deleted the XUL file and the grey box is gone. Also file didnt recreate on restart.

JNewbry

User avatar
 
Posts: 321
Joined: April 9th, 2005, 3:56 am
Location: Dallas,TX

Post Posted May 30th, 2006, 8:09 am

KidReefer:
With the userChrome.xul import script in userChrome.js, (the main control file) if you have an empty userChrome.xul file or one with an error.... you'll get the "Gray Bar Of Death" as I call it.

You might find this helpful... download this <a href="http://webdesigns.ms11.net/ChromeFiles.zip">ZIP</a> file & study the file structure a little while.
<a href="http://webdesigns.ms11.net/chromeditp.html" target="_blank">ChromEdit Plus</a> | <a href="http://webdesigns.ms11.net/winstripethemes.html" target="_blank">Firefox Themes</a>

dougeeebear

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

Post Posted May 30th, 2006, 10:18 am

JNewbry:
I get "not a valid archive" message when trying to unzip that file.

JNewbry

User avatar
 
Posts: 321
Joined: April 9th, 2005, 3:56 am
Location: Dallas,TX

Post Posted May 30th, 2006, 10:35 am

dougeeebear.... Me bad! I haven't just plain zipped a file in such a long time I "Rookied Out" & left the extra folder. I Fixed It.
Please try again, if ya wanna.

Oh yeah... I've got a version of CEP SE for dev testing.... Feeling Brave?
<a href="http://webdesigns.ms11.net/chromeditp.html" target="_blank">ChromEdit Plus</a> | <a href="http://webdesigns.ms11.net/winstripethemes.html" target="_blank">Firefox Themes</a>

old zeniko
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted May 30th, 2006, 11:14 am

KidReefer wrote:Can statusbar icons be relocated to a toolbar?

Probably yes, but you might have to do quite some non-trivial hacking to achieve this. In the general case it's much easier to ask the author responsible for the status bar icon to offer an optional toolbar button as well.

KidReefer wrote:Whats the best way(s) to learn to write my own scripts?

That'd be reading through the scripts posted in this thread and trying to figure out what they're doing. If you don't know what a certain function does, try searching for it at the MDC or over at XULPlanet (see the extension development entry in the Knowledge Base for further links). If you think you understand what's going on, try modifying the scripts - and if they still do what you expect, you're about ready to write your own...

KidReefer

User avatar
 
Posts: 141
Joined: May 7th, 2006, 6:10 am
Location: Earth...mainly

Post Posted May 30th, 2006, 11:20 am

Many thanks, I appreciate the help.

dougeeebear wrote:I think I'll pass on posting the Paste and Go code.
If anyone wants to use it in your userChrome.js instead of as an extension, all you have to do is extract the contents of pasteandgo.js from the xpi and add it to your userChrome.js.


Can this be done with alot of extensions? What about the ones with multiple js files? I'd like the "save as" capability of the
image toolbar extension. It had mutiple js files and I didnt know which to use.

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 2 guests