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:
<br />
<binding id="searchbar" extends="chrome://browser/content/search.xml#searchbar-base"><br />
<content><br />
<xul:stringbundle src="chrome://browser/locale/searchbar.properties"/><br />
<xul:textbox class="searchbar-textbox" type="autocomplete" flex="1"<br />
enablehistory="true"<br />
autocompletepopup="PopupAutoComplete"<br />
...<br />
2) content/browser/browser.xul:
Find the "search-container" toolbaritem and add flex attributes to them. Make it so:
<br />
<toolbaritem id="search-container" title="&searchItem.title;"<br />
align="center" flex="1000" class="chromeclass-toolbar-additional"><br />
<searchbar id="searchbar" flex="1000" /><br />
</toolbaritem><br />
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...