[Ext] userChrome.js

Announce and Discuss the Latest Theme and Extension Releases.
Locked
Lost User 255607
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Lost User 255607 »

esquifit wrote:There is however a minor bug, namely that html entities need to be espaped in href values. For example the following link (in this very same page, see the post of pirlouy on 24 Mar 2007 08:25 pm) fails because it is using '&' instead of '&':

Code: Select all

<a href="http://pirlouy42.free.fr/Firefox/userChrome.js/Drag&amp;Go.uc.js" target="_blank" class="postlink">Drag&amp;Go</a> 

Thank you for the point.
I corrected these scripts.
Old Greg S
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old Greg S »

DMCrimson wrote:Found this from my old profile:

Code: Select all

WindowHook.register("chrome://global/content/customizeToolbar.xul", function(aWindow) {
   // new dimensions for the Customize Toolbars window
   const DIALOG_WIDTH = 1000;
   const DIALOG_HEIGHT = 800;
   
   var codeToInject = 'eval("repositionDialog = " + repositionDialog.toString().replace(/kWindowWidth/g, ' + DIALOG_WIDTH + ').replace(/kWindowHeight/g, ' + DIALOG_HEIGHT + '));'
   
   // inject the code into the dialog's JS context
   Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
             .getService(Components.interfaces.mozIJSSubScriptLoader)
             .loadSubScript("data:text/javascript," + encodeURIComponent(codeToInject), aWindow);
});


but it wont work anymore, any ideas?


It works for me using Fx1.5. I can't remember for sure, but I don't think it's needed in 2.0. IRC the last time I used 2.0, I opened CTW, resized/positioned and it remembered all. I just put in a new HD on my notebook and haven't added my Fx2.0 yet.
DMCrimson
Posts: 1025
Joined: February 13th, 2004, 6:11 am

Post by DMCrimson »

hmm, on mac CTW opens up as a sheet, which is not repositionable nor resizable...
Lost User 255607
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Modification to findbar

Post by Lost User 255607 »

To show the found term in the middle of the screen.

It is applied at the following.

1.Find from Findbar.
2.SearchWP Version1.0
3.All-In-One Search button Version1.67

and It is compatible XUL/Migemo [Forked Edition]0.5.0~

This script can be worked with Firefox2.0.0.3, Firefox3.0α4pre, Windows XP.

ttp://space.geocities.jp/alice0775/STOR ... dbar.uc.js
alta88
Posts: 1029
Joined: January 28th, 2006, 3:08 pm

Post by alta88 »

@max1million,

that's it, perfect. easy in retrospect.. thanxamillion.
max1million
Posts: 2810
Joined: November 15th, 2004, 5:03 am

Post by max1million »

@alta88
Your welcome. You mentioned "a lot of DOM parsing on every load for an infrequent match". Once I put together the idea of testing URL of the load event.originalTarget for an "for an infrequent match" and realized it was theDocument...
alta88
Posts: 1029
Joined: January 28th, 2006, 3:08 pm

Post by alta88 »

oh, i discovered in testing 3 cases, load xul in
-split browser pane
-sidebar
-tab

that there can be a load event with no event.originalTarget.location, while .mIsBusy is true (for a load in process, for i guess progressbar or tooltip), so i just return if that's true. avoids console errors.
max1million
Posts: 2810
Joined: November 15th, 2004, 5:03 am

Post by max1million »

Ok, added
if (!theDocument.location) return;
DMCrimson
Posts: 1025
Joined: February 13th, 2004, 6:11 am

Post by DMCrimson »

Ha! Made it! From old posts I found references to tweaking browser's jars, but apparently I didn't do it correctly... The correct place is in en-US.jar -> locale/en-US/global/customizeToolbar.dtd
eloriam
Posts: 16
Joined: July 18th, 2006, 12:57 pm

Post by eloriam »

how i can make bookmarks open in a new tab instead kill the actual one?
I dont want to install TAB MIX + neither ctrl+clic neither middle mouse click(i dont have middle button)
I think that is impossible do it with css
Or maybe changing some line code in browser.jar
Old Greg S
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old Greg S »

DMCrimson wrote:Ha! Made it! From old posts I found references to tweaking browser's jars, but apparently I didn't do it correctly... The correct place is in en-US.jar -> locale/en-US/global/customizeToolbar.dtd

It may have changed then. It used to be in customizeToolbar.js for Win.
DMCrimson
Posts: 1025
Joined: February 13th, 2004, 6:11 am

Post by DMCrimson »

Greg S wrote:It may have changed then. It used to be in customizeToolbar.js for Win.


Now the only thing that's in customizeToolbar.js (toolkit.jar) is

Code: Select all

const kRowMax = 4;

no nore height or width, that's propably why the snippet ceased working...
User avatar
dougeeebear
Posts: 548
Joined: September 15th, 2005, 4:17 pm

Post by dougeeebear »

There is a site (my bank) that will not display a certain page with the user agent set as Firefox, but it will when I set the user agent as IE6.
Is there a way to have the user agent change to IE on specified sites only, then switch back to Firefox when leaving the site?

Thanks, Doug
Last edited by dougeeebear on April 10th, 2007, 7:11 am, edited 1 time in total.
DMCrimson
Posts: 1025
Joined: February 13th, 2004, 6:11 am

Post by DMCrimson »

hmm, I think you could use simple scriptl to change this, read UA value, if it's FF, set to IE and vice versa... just an idea that came to my mind, no real clue how to realize this:P
roshanpv
Posts: 47
Joined: December 26th, 2006, 8:40 am

Post by roshanpv »

Well i have many toolbars like wizz rss and diggo toolbar installed
when i go to full screen the textual labels for the buttons disappears
i always use the full screen view only

and right click is disabled in many places
so is there any way to be full screen and also have the textual labels


Places where textual labels are missing


1) find bar
2) wizz rss toolbar
3) diggo toolbar


any solutions by using the userchrome.js extension please looking forward for the solutions
Locked