0

New Tab

Is it possible to change the icon for New Tab in Firefox? I'm looking to change it to Internet Explorer.

If it matters, I'm using Linux with a Windows 95 theme.

1

Theoretically, yes, it is possible to change the icon for the New Tab page in Firefox.

My first thought was to create a Userscript for the about:newtab page, but this is not supported by Greasemonkey because the about:newtab page has chrome level privileges.

The HTML and assets for the about:newtab page are contained in a jar-type file called omni.ja! or omni.ja. You can find it's path by opening about:newtab, right clicking on the page itself and clicking View Source. Right click in the source and click Page Info. The title of the page on my Windows machine shows the URL as:

jar:file:///C:/Program%20Files/Mozilla%20Firefox/browser/omni.ja!/chrome/browser/res/activity-stream/prerendered/en-US/activity-stream.html

I've seen some mixed advise on whether files within omni.ja! are modifiable. Either way, the main thing to remember is that this file can (and probably will) be replaced by Firefox updates at some point. Any changes made would need to be repeated after updates.

The favorites icon for the about:newtab page is definied as:

<link rel="icon" type="image/png" href="chrome://branding/content/icon32.png"/>

Meaning you can either replace the chrome://branding/content/icon32.png file or modify the link to point to another file.

Based on Modifying Firefox Files Inside Omni.ja, you can use the following commands to unzip omni.ja/omni.ja!:

$ tar xf ~/Tarballs/firefox-60.0.2.tar.bz2
  # (This creates a "firefox" directory inside the current one.)

$ mkdir omni
$ cd omni

$ unzip -q ../firefox/browser/omni.ja
warning [../firefox-60.0.2/browser/omni.ja]:  34187320 extra bytes at beginning or within zipfile
  (attempting to process anyway)
error [../firefox-60.0.2/browser/omni.ja]:  reported length of central directory is
  -34187320 bytes too long (Atari STZip zipfile?  J.H.Holm ZIPSPLIT 1.1
  zipfile?).  Compensating...
zsh: exit 2     unzip -q ../firefox-60.0.2/browser/omni.ja

$ sed -i 's/or enter address/or just twiddle your thumbs/' chrome/en-US/locale/browser/browser.dtd chrome/en-US/locale/browser/browser.properties

And the following to re-zip:

$ zip -qr9XD ../omni.ja *

Warning: This could break Firefox for you. Be sure to test this modification in a test profile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.