5

I've installed some useful Firefox addons, like "stylish", which make pages darker so my monitor isn't so blinding at night. The problem is that Firefox turns blinding white as the page is loading. It only shows the pages' style or the addons' style when the page is loaded, which can be a while sometimes. How do I get the default background color to be black?

I already tried setting the "Background Color" under "Content" -> "Colors" (as shown below). It either doesn't do anything, or it makes all text on all pages completely unreadable if I choose "Always" in the dropdown. Is there another way?

This doesn't work

Hassan
  • 573

2 Answers2

3

I found an answer from http://forums.mozillazine.org/viewtopic.php?p=2989626#p2989626 with help from http://kb.mozillazine.org/index.php?title=UserChrome.css.

The Mozilla directory depends on your operating system:

Windows NT (NT4.x/2000/XP/Vista/7/8/10): "%APPDATA%\Mozilla\"

Windows 95 (without Desktop Update): C:\Windows\Mozilla

Windows 95 (with Desktop Update)/98/Me: C:\Windows\Application Data\Mozilla\, C:\Windows\Profiles\[Windows login/user name]\Application Data\Mozilla\

Unix/Linux: ~/.mozilla/

Mac OS X: ~/Library/Mozilla/, ~/Library/Application Support/

After finding the Mozilla directory you have to go through a few more directories to find your profile directory. See http://kb.mozillazine.org/Profile_folder_-_Firefox.

In your profile directory, if it doesn't exist, create the chrome directory. Then create a new text file in chrome called userChrome.css with the following contents:

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
browser { background-color: #333 !important; }

You can change the background color to whatever you want. Unfortunately for me the screen still flashes white very briefly but this fix is still very nice.

1

I would highly recommend using ShadowFox! Thanks guys for your hard work!

First find how which is your default profile in about:profiles. Find the entry for Default Profile.

Then enable the user profile customization in about:config

toolkit.legacyUserProfileCustomizations.stylesheets;true

And finally install ShadowFox. For mac users:

brew install srkomodo/tap/shadowfox-updater
shadowfox
# follow instructions, pick default profile