MozillaZine

[Ext] userChrome.js

Announce and Discuss the Latest Theme and Extension Releases.
XerBlade

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

Post Posted August 4th, 2006, 9:08 pm

lyn2005 wrote:I should have added, I tried both notepad and metapad to create js.user ... in my profile folder, of course. Seems like that's the first thing I better figure out..

You have to install the extension that this thread is about, from the first post.
Then, there will be a file automatically created in your Chrome folder named userChrome.js.
Also, the ChromEdit Plus extension and the MR Tech Local Install extension's Chrome Editor have tabs for the userChrome.js file in addition to the ones ChromeEdit has that you can take advantage of after you install the extension from this thread.
And the ChromEdit Plus SE extension already contains the userChrome.js extension functionality within it, so, if you were to use that, you wouldn't have to install the extension from here either.
User Agent
Extensions
AMD64/2.41GHz RAM/1.0GB ATI/256MB-GDDR3/128-bit/8xAGP Cable6.0M/384kbps

lyn2005
 
Posts: 22
Joined: September 30th, 2005, 10:56 am

Post Posted August 4th, 2006, 9:36 pm

Just want to say thank you. I now have not only the newest ChromEdit
extension but also the tooltip text working on my Bookmarks Toolbar folders.

yipee...:-)

gssq

User avatar
 
Posts: 503
Joined: December 7th, 2002, 10:17 am
Location: Singapore

Post Posted August 4th, 2006, 10:29 pm

Is there a way to uninstall this extension? It doesn't show up in the Add-ons Manager...

XerBlade

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

Post Posted August 5th, 2006, 10:16 pm

gssq wrote:Is there a way to uninstall this extension? It doesn't show up in the Add-ons Manager...

It does for me, on several different profiles and in 2.0 beta, 2.0 nightlies, and trunk nightlies... and 1.5 as well, but there's no "Add-ons Manager" in that anyway, so....
Are you sure you don't have the ChromEdit Plus SE extension installed (see my previous post) and just somehow or another thought you installed the standalone userChrome.js extension?
User Agent
Extensions
AMD64/2.41GHz RAM/1.0GB ATI/256MB-GDDR3/128-bit/8xAGP Cable6.0M/384kbps

gssq

User avatar
 
Posts: 503
Joined: December 7th, 2002, 10:17 am
Location: Singapore

Post Posted August 5th, 2006, 11:25 pm

Ok I reinstalled and it seems to show up now.

Zoolcar9

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

Post Posted August 6th, 2006, 2:10 pm

  • Image Sender
    Send image or background image to Flickr or ImageShack from context menu
    Updated 2006-09-05: cleaned up
  • Element Inspector
    Right click anywhere on content or browser window to inspect the element with DOMI
    Updated 2006-09-05: middle click on menu item will open the inspect object
Last edited by Zoolcar9 on September 5th, 2006, 5:36 am, edited 6 times in total.
My Firefox information | Add-ons | GitHub

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

paulfox
 
Posts: 1510
Joined: May 8th, 2004, 1:38 pm

Post Posted August 6th, 2006, 2:32 pm

@Zoolcar9: You are (yet again) . . . a GOD, sir! Fantastic work. "Inspect This" was very very handy for me, but 624k before removing locales; 112k with en_US only. Now this GREAT 1500 byte "element inspector," complete with context menu entry - a keeper - thanks so very much. I hope there'll be more development of these non XUL, userchrome.js "extension replacers," or even newly developed functions. It's the way to go! I'm sporting only 3 as of now - the one above for "inspect," "OpenChrome"and Desert Fox's "Mouse Gestures." All total 4k, and are indispensable. / p
PentiumIII/W2K, Toshiba AMD laptop/Vista. FX 3 on both.

pile0nades
 
Posts: 756
Joined: May 15th, 2005, 2:31 am

Post Posted August 6th, 2006, 3:44 pm

Wow, Zoolcar9. That Element Inspector is some l337 h4x! A real time saver, thanks man!

One thing though, I think you'd probably know this. I've seen code like
Code: Select all
var tabbrowser = this.parentNode.parentNode.parentNode.parentNode;

used in tabbrowser code. Isn't there a cleaner way to refer to the tabbrowser element than that?
Linkify bug numbers - test: bug 258287

Zoolcar9

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

Post Posted August 6th, 2006, 4:14 pm

pile0nades wrote:Isn't there a cleaner way to refer to the tabbrowser element than that?

I wish I know. I got that from TMP's tabs context menu.

The ideas are from this post (Image Sender) and these extensions (Inspect Element). But the extensions can only inspect content document elements from context menu.
Glad you all like it :)

Oh, almost forgot. Here are the XUL version of Image Sender and Frank's Save Background Image:
  • <a href="view-source:data:application/vnd.mozilla.xul+xml;base64,PG92ZXJsYXkgaWQ9ImNvbnRleHRJbWFnZVVwbG9hZGVyIgogICAgICAgICB4bWxucz0iaHR0cDovL3d3dy5tb3ppbGxhLm9yZy9rZXltYXN0ZXIvZ2F0ZWtlZXBlci90aGVyZS5pcy5vbmx5Lnh1bCI%2BCgogIDxzY3JpcHQgdHlwZT0iYXBwbGljYXRpb24veC1qYXZhc2NyaXB0Ij4KICA8IVtDREFUQVsKICAgIHdpbmRvdy5zZXRUaW1lb3V0KGZ1bmN0aW9uKCkgewogICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgiY29udGVudEFyZWFDb250ZXh0TWVudSIpCiAgICAgICAgLmFkZEV2ZW50TGlzdGVuZXIoInBvcHVwc2hvd2luZyIsIGZ1bmN0aW9uKGV2ZW50KSB7CiAgICAgICAgICBnQ29udGV4dE1lbnUuc2hvd0l0ZW0oImNvbnRleHQtc2VuZGltYWdlVG8iLCBnQ29udGV4dE1lbnUub25JbWFnZSk7CiAgICAgICAgICBnQ29udGV4dE1lbnUuc2hvd0l0ZW0oImNvbnRleHQtc2VuZGJnaW1hZ2VUbyIsIGdDb250ZXh0TWVudS5oYXNCR0ltYWdlKTsKICAgICAgICB9LCBmYWxzZSk7CiAgICB9KTsKICBdXT4KICA8L3NjcmlwdD4KCiAgPHBvcHVwIGlkPSJjb250ZW50QXJlYUNvbnRleHRNZW51Ij4KICAgIDxtZW51IGlkPSJjb250ZXh0LXNlbmRpbWFnZVRvIgogICAgICAgICAgbGFiZWw9IlNlbmQgSW1hZ2UgVG8uLi4iCiAgICAgICAgICBpbnNlcnRhZnRlcj0iY29udGV4dC1zZW5kaW1hZ2UiPgogICAgICA8bWVudXBvcHVwCiAgICAgICAgICBvbmNvbW1hbmQ9ImdCcm93c2VyLmxvYWRPbmVUYWIoZXZlbnQudGFyZ2V0LmdldEF0dH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3VybD0iIC8%2BCiAgICAgICAgPG1lbnVpdGVtCiAgICAgICAgICBpZD0iY29udGV4dC1zZW5kYmdpbWFnZVRvLWltYWdlc2hhY2siCiAgICAgICAgICBsYWJlbD0iSW1hZ2VTaGFjayIKICAgICAgICAgIHVybD0iaHR0cDovL2ltYWdlc2hhY2sudXMvdHJhbnNsb2FkLnBocD91cmw9IiAvPgogICAgICA8L21lbnVwb3B1cD4KICAgIDwvbWVudT4KICA8L3BvcHVwPgoKPC9vdmVybGF5PiAKCg%3D%3D">ImageSender.xul</a>
  • <a href="view-source:data:application/vnd.mozilla.xul+xml;base64,PCEtLSA6Ojo6Ojo6OiBCYWNrZ3JvdW5kIEltYWdlIE1lbnUgSXRlbXMgYnkgRnJhbmsgKERlc2VydEZveCkgOjo6Ojo6Ojo6Ojo6Ojo6IC0tPgo8IS0tIGh0dHA6Ly9zdXBlcnQuZ2FyeXIubmV0L3VzZXJjaHJvbWUvIC0tPgoKPG92ZXJsYXkgaWQ9ImNvbnRleHRTYXZlQmdJbWFnZSIgeG1sbnM9Imh0dHA6Ly93d3cubW96aWxsYS5vcmcva2V5bWFzdGVyL2dhdGVrZWVwZXIvdGhlcmUuaXMub25seS54dWwiPgoKICA8c2NyaXB0IHR5cGU9ImFwcGxpY2F0aW9uL3gtamF2YXNjcmlwdCI%2BCiAgPCFbQ0RBVEFbCiAgICB3aW5kb3cuc2V0VGltZW91dChmdW5jdGlvbigpIHsKICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoImNvbnRlbnRBcmVhQ29udGV4dE1lbnUiKQogICAgICAuYWRkRXZlbnRMaXN0ZW5lcigicG9wdXBzaG93aW5nIiwgZnVuY3Rpb24oZXZlbnQpIHsKICAgICAgICBpZihnQ29udGV4dE1lbnUgIT0gbnVsbCkgewogICAgICAgICAgZ0NvbnRleHRNZW51LnNob3dJdGVtKCJjb250ZXh0LXNhdmViZ2ltYWdlIiwgKAogICAgICAgICAgICBnQ29udGV4dE1lbnUua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leHRNZW51LmRvY1VSTCkpOyIKICAgICAgaW5zZXJ0YWZ0ZXI9ImNvbnRleHQtdmlld2JnaW1hZ2UiIC8%2BCiAgPC9wb3B1cD4KCjwvb3ZlcmxheT4gCgo%3D">contextSaveBGImage.xul</a>

See this post about how to use userChrome.xul
Last edited by Zoolcar9 on September 4th, 2006, 9:52 am, edited 2 times in total.
My Firefox information | Add-ons | GitHub

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

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

Post Posted August 6th, 2006, 11:41 pm

pile0nades wrote:Isn't there a cleaner way to refer to the tabbrowser element than that?

There is (and the snippets already partially use it): use <code>var tabbrowser = getBrowser();</code> instead or simply rely on the global <code>gBrowser</code> variable in the first place.

pile0nades
 
Posts: 756
Joined: May 15th, 2005, 2:31 am

Post Posted August 7th, 2006, 2:32 am

There's a bug with the Element Inspector script (not the xul version, haven't tried that yet).
Image
The menuitem appears in the address bar drop down, and clicking it makes firefox crash.
Linkify bug numbers - test: bug 258287

Zoolcar9

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

Post Posted August 7th, 2006, 7:23 am


Sorry the XUL is for Image Sender, not Inspector.

There's a bug with the Element Inspector script

I'm working on it.

//edit: <a href="#2415455">Updated</a>. Please try it.
My Firefox information | Add-ons | GitHub

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

pile0nades
 
Posts: 756
Joined: May 15th, 2005, 2:31 am

Post Posted August 7th, 2006, 8:12 am

^^Fixed :)
Linkify bug numbers - test: bug 258287

Zoolcar9

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

Post Posted August 7th, 2006, 8:58 am


*Phew* Thanks :)

My Firefox information | Add-ons | GitHub

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

Chad-)
 
Posts: 166
Joined: August 29th, 2005, 7:01 am

Post Posted August 13th, 2006, 4:26 am

This extension is great. Just to put on record my appreciation for the work you've done Zeniko d :-o

Already have a slew of requests ;)
desertfox wrote:Presenting...
Mouse Gestures with userChrome.js

i just wrote a userChrome.js spinnet for mouse rocker gestures!
...
any suggestions for more gestures?

Releasing the right mouse button brings up the context menu. Especially annoying when you have to go forward a number of times. Any way to not make this happen?
Also the right-clicking & using scroll wheel to switch tabs doesn't work at times on a heavy page when it is loading. I've seen the feature of scrolling over the tab bar in AIOG works at such times also.

Can I make a toolbar vertical? I'd asked this in the Stylish thread before.
TIA
Chad-)
Last edited by Chad-) on October 13th, 2006, 12:58 am, edited 1 time in total.

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 0 guests