Resize Search Bar in Firefox 1.0

This thread is an update to an older thread which talked about how to make Mozilla Firefox's search bar resizable. I wrote this tip when Firefox was at 0.9. Imagine my anger when I found out this fix did not work with Firefox 1.0.

Well, I kept with Firefox 0.9 on one computer and lived with the horridly sized searchbar in Firefox 1.0 long enough. It's now time to describe how you can enable the search bar to be auto-sized with history enabled in Firefox 1.0:

- first, we'll create a new toolbar in which we'll add the search bar and some useful buttons. You may skip this step if you've already done it:
*** go to View > Toolbars > Customize
*** click "Add New Toolbar" and rename it to "Search"
*** drag the Google search bar (probably located on your Navigation toolbar onto your new Search toolbar
*** draw a separator onto the new toolbar to the right of Google
*** drag some useful buttons onto the new toolbar to the right of the separator

You should now have a toolbar with a small google search textbox, a separator and some buttons (like "Add New Tab", etc). Now wouldn't it be great if that search textbox auto-sized depending on the browser window width? Of course it would...

First, unzip your chrome/browser.jar and make the following file changes:
1) content/browser/search.xml:
Find the "searchbar" item and add the line enablehistory="true" to the xul:textbox. Make it so:

</p>
<p>

Now zip back up your browser.jar. Unzip the classic.jar and edit the following file:

3) skin/classic/browser/searchbar.css

Find the .searchbar-textbox style and instead of a fixed with, make it so:

<br />
.searchbar-textbox {<br />
  width: 100%;<br />
}<br />

Now zip back up your classic.jar and try it out...

If you're lazy or scared, I've put the browser.jar and classic.jar up on my website (for 1.0), but this will overwrite any changes you've happened to make...

Post new comment
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can use BBCode tags in the text.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor, sorry but we need it to help prevent automated submissions.
ten minus nine equals
Solve this math question and enter the solution with digits. E.g. for "two plus four = ?" enter "6".