Wednesday, May 20, 2009

Adding the Launch Image to the Background of Firefox Empty Tabs with NASA Night Launch

Far and away the most common support request we get from NASA Night Launch users is for instructions on how to add the night launch image to the background of empty tabs. The news is that the old method is now officially deprecated. You should stop using it and start using the new method instead.

The New and Improved

What new method, you may ask? The new method uses the add-on Stylish and Userstyle 11979 - NASA Night Launch - Launch Image for Empty Tabs. If you want to try this:
  1. Install Stylish from AMO
  2. Restart Firefox
  3. Install Userstyle 11979 in Stylish
It does just what it says: empty tabs, launch image, problem solved.

The main benefit of the new (Stylish-based) method is that it's easy to turn it on and off without restarting Firefox. To turn it off (or back on) just go to Stylish's "Manage Styles" window and disable (or re-enable) Userstyle 11979.

This is important because both the new and old methods share one weakness: they sometimes apply themselves to rectangular regions of common web pages, of which Google Mail is sometimes an example. There's no way (at present, using Firefox theme technologies) to apply the background image to empty tabs without also sometimes applying it to parts of web pages. This is why it's important to be able to turn it on and off: if it's in the way, just disable the style, and if you want it then turn it back on again. No need to restart Firefox. People trying to avoid the retinal burn of a blank white new tab will appreciate this ability.

The Bad Old Way

The old method, now deprecated, involved adding code to Firefox's userContent.css file, which worked but definitely had its problems.
  1. You had to restart Firefox for it to take effect after editing userContent.css.
  2. If you wanted to undo the effect (such as when switching themes), you had to again edit userContent.css and again restart Firefox.
  3. It was all too easy to get confused about whether to edit userContent.css or userChrome.css, and why there were two files with almost identical names doing almost-but-not-quite identical things. The naming makes perfect sense of you're one of the people creating browsers, but not so much otherwise.
  4. It was hard for people to even find the file to edit.
  5. For most users, not knowing the "programming language" (CSS) of userContent.css, it was hard for them to have confidence that they could edit this file without messing something up. No one should be asked to do that.

Removing Code from the Old Method

If you were using the old and now deprecated userContent.css method, you should remove the relevant code from your userContent.css file. The code to remove looks like this:

@-moz-document url(about:blank) {
html:not([class]) {
no-repeat center center fixed black !important;

When you edit the file, just remove that code, leave everything else in the file in place, save your changes and then restart Firefox.

If you need any help with this, just post your question on the NNL support thread on MozillaZine. You would almost certainly be asked to post a copy of your current userContent.css file (and to name the folder in which you found it, if possible), after which you would get back a copy of the file with the relevant code removed to save for your own use.

Get Stylish:
Get Userstyle 11979 - NASA Night Launch - Launch Image for Empty Tabs

1 comment: