How to modify the New Tab page in Firefox with Stylish?

3

I just upgraded to Firefox 58 after using Chrome for a very long time. I've downloaded Stylish and created the following custom style:

@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix("about:newtab") {
    body {
        background-color: #111111 !important;
    }
}

It is saved and enabled, but when I open a new tab Stylish doesn't display any installed styles:

enter image description here

However, when I switch to any other page, Stylish does show the style I included above:

enter image description here

Even if I manually navigate to about:newtab, the style still does not activate.

So, how do I change the background color of the newtab page in Firefox with Stylish?

sab669

Posted 2018-01-25T14:21:35.930

Reputation: 779

1

Have you though about using an extension like New Tab Tools? https://addons.mozilla.org/en-US/firefox/addon/new-tab-tools/ Also lets you customize new tab in other ways...

– Clayton – 2018-01-25T15:54:42.230

@Clayton Thanks for the suggestion; I'll use that for now although I'd rather figure out what I'm doing wrong with Stylish. – sab669 – 2018-01-25T15:59:01.103

Answers

4

Solution on Youtube

If author of the vid will delete it , then reupload this vid to Bitchute.com (:D) or read text version of instructions :

  1. Type in the adress bar about:profiles
  2. Open your ROOT Directory by clickin "Open directory button". Not Local Directory.
  3. Create "chrome" directory here by mkdir chrome command in terminal or via right click button of your mouse.
  4. Open folder that you created and create css file here by naming it "userContent.css"
  5. Paste this code to your "userContent.css" file :

    @-moz-document url("about:newtab") { body { background-color: #000000 !important; } }

  6. Restart your browser manually or by clickin "Restart normally..." button in about:profiles adress.

You will get results that you need ! :)

Mikey

Posted 2018-01-25T14:21:35.930

Reputation: 106

1Thanks; I ended up finding this last night. Accepting this as the answer instead of Clayton's as it does not rely on yet another addon – sab669 – 2018-01-26T12:58:26.563

Yeah, installing addons makes your browser more unique, that not cool in some aspects. – Mikey – 2018-01-26T12:59:38.947

1Just wanted to add another note: While Firefox is configured to 'show a blank page' on start up, it was not respecting this userContent.css file so when I would first open Firefox it would show a white background. What I did to get around this is to set it to 'open my homepage' and then just put about:newtab as my homepage – sab669 – 2018-01-31T13:23:09.883

1

Have you though about using an extension like New Tab Tools? http://addons.mozilla.org/en-US/firefox/addon/new-tab-tools Also lets you customize new tab in other ways...

about:newtab is now considered a browserinternal page by Firefox57+ and therefore extensions like Stylish only have restricted access for security reasons. You can still style it manually by using the userChrome.css https://www.userchrome.org/what-is-userchrome-css.html

Clayton

Posted 2018-01-25T14:21:35.930

Reputation: 437