Change about:blank background

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.
Please direct questions that are Mac or Linux-specific (dealing with installation and OS integration) to the appropriate Linux or Mac board.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only. The main focus here is on Pale Moon on Windows. Please direct your questions that are specific for Linux and Mac to the dedicated boards for those operating systems.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
Locked
damamm

Change about:blank background

Post by damamm » 2014-07-20, 01:15

Greetings,

I've been trying to tweak my about:blank page background to make it black, but to no avail so far. I wonder if anyone would know of a way to make that happen, with the observation that it must affect only the about:blank page and the empty page which appears when opening new tabs (I'm guessing they're the same?).

Anyway, here's for what I already tried:
1- changing the background color from the options>content. That works but won't do, because since it affects the standard background color in every page it breaks several layouts.
2- using the folowing chrome edit:

Code: Select all

@-moz-document url("about:blank") {
background-color: #000000;
}
3- using the following chrome edit:

Code: Select all

@-moz-document url-prefix(about:blank) {*{background-color:#000000;}}
Any help would be appreciated. Thanks in advance!

On a sidenote:
In case someone else has a bother with this, what I did manage to get working was to rid the white page that flashed (for an instant) when I opened a new page on a new tab (eg. when ctrl+click on a bookmark), through the use of the following chrome edit:

Code: Select all

browser { background-color: #000 !important; }

riiis
Lunatic
Lunatic
Posts: 466
Joined: 2014-05-17, 15:51
Location: USA

Re: Change about:blank background

Post by riiis » 2014-07-20, 02:57

Install and use the "Customize about:newtab" add-on (https://addons.mozilla.org/en-US/firefo ... outnewtab/) to change the new tab page background color or image.

This add-on only works on the "about:newtab" page, and not on the "about:blank" page. So, first change your new tab page, from "A blank page", to "The Quickdial page", in Pale Moon options "Tabs" pane. Next click the "Hide the new tab page" button on the upper right corner of the Quickdial page.

buggy

Re: Change about:blank background

Post by buggy » 2014-07-20, 03:48

Personally for a gray background i use Stylish with this style i have modified, not sure the modif is in the standards but it works fine hehe:

Code: Select all

/********************************/
/*   about:blank - Dark Firefox */
/********************************/
/* By Wyco (wyco.deviantart.com */
/********************************/

@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url("about:blank") {
*:empty:not([style]):not([text]):not([class]):not([onresize]) {

background:
margin:0px;
background-color:#303030;
background-position:center;
background-attachment:fixed;
background-repeat:no-repeat;
}
.editable, .editable * {
background:none !important;
}

}

damamm

Re: Change about:blank background

Post by damamm » 2014-07-20, 04:17

Thanks for the resposnses,

however, I'd rather avoid having to use a new addon just for this small change... seems something so simple, there has to be a way to set this.

I tried using buggy's code on my userchrome file, but it didn't do anything. Shouldn't it work from there?

buggy

Re: Change about:blank background

Post by buggy » 2014-07-20, 04:32

Probably simple but like you when i try with the same code you show it does not work, as i have never this kind of problem with Stylish i have not tried more. If without add-on someone has the solution i will be happy for you.

damamm

Re: Change about:blank background

Post by damamm » 2014-07-20, 04:40

Hahahahah
dammit, I found the mistake.

I actually have to use the code in userContent.css, not in userChrome.css like I was doing.
so, using

Code: Select all

@-moz-document url-prefix(about:blank) {*{background-color:#000000;}}
in userContent (for about:blank page), and

Code: Select all

browser { background-color: #000 !important; }
in userChrome (for the brief empty page during loads)
did the trick for me ;)

Thanks for the help guys! This is solved.

buggy

Re: Change about:blank background

Post by buggy » 2014-07-20, 04:47

Not sure it was for that also, but i use Click & Clean to clean the cache and close all tabs, i seem to remember that with the solution you give it shows white background during a short time before showing black, which its not the case with Stylish.

damamm

Re: Change about:blank background

Post by damamm » 2014-07-20, 05:04

Hmm, the only white background I still receive is when I'm loading the browser: it flashes white for an instant before going black (I have my homepage set to about:blank).
This wouldn't happen if I set the standard background to black via options>content. But I can live with it... Other than that, no white when loading pages, new tabs or anything.

buggy

Re: Change about:blank background

Post by buggy » 2014-07-20, 05:30

In general options changing white for black is not good that's why i prefer using Stylish. I agree if it happens just at start you can live with this, but as i use C&C often for me this is more annoying, that's why i also wanted to give this advice.

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 8882
Joined: 2012-10-09, 19:37
Location: Skaro

Re: Change about:blank background

Post by New Tobin Paradigm » 2014-07-20, 05:35

The about:blank page is an ancient hard-coded "page" of NO content it doesn't even technically exists unlike many other about: pseudo-URIs. The reason it flickers, although I do not agree with the specific css property you chose as it is assigned to an ID defined by chrome (the UI hence userChrome), is that it takes a second to apply the styling after the fact.

The docshell code is one of the oldest components of gecko btw. Hell, I doubt even Mozilla fully understands it. So for Pale Moon to offer this option in a proper way it would require overriding the docshell code from the browser core perspective OR modify the docshell code directly which given it's importance may not be something we should really be screwing with just to provide one silly option. In fact about:blank is so old and so ingrained I am not sure the local (browser core) about redirector could be made to bypass it by adding the entry and sending the request down a different code path that normally gets sent through docshell directly. There has to be a well defined midpoint between user choice enhancement and real world practicalities to code modification.
How far are you prepared to go? How much are you prepared to risk? How many people are you prepared to sacrifice for victory?
Are you willing to die friendless, alone, deserted by everyone? Because that's what may be required of you in the war that is to come.

Image

buggy

Re: Change about:blank background

Post by buggy » 2014-07-20, 06:10

Thanks Matt for explanations ;)
Off-topic:
It was the main reason i prefered Eraser instead of Click & Clean, with Eraser it was possible to choose our page instead of about:blank.

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 8882
Joined: 2012-10-09, 19:37
Location: Skaro

Re: Change about:blank background

Post by New Tobin Paradigm » 2014-07-20, 07:27

buggy wrote:Thanks Matt for explanations ;)
Off-topic:
This may seem pretentious as all hell but would it be cool if in the future you would address me either by my preferred form of my full name "Matt A. Tobin" or my username "mattatobin" or simply as "Tobin".

There is of course reasons (some even valid) behind it but that would detract from the pretentious nature of the request 8-)

Peace!

PS no apology is needed as obviously no one would be able to know this until I said something...
How far are you prepared to go? How much are you prepared to risk? How many people are you prepared to sacrifice for victory?
Are you willing to die friendless, alone, deserted by everyone? Because that's what may be required of you in the war that is to come.

Image

buggy

Re: Change about:blank background

Post by buggy » 2014-07-20, 07:33

mattatobin wrote:
Off-topic:
This may seem pretentious as all hell but would it be cool if in the future you would address me either by my preferred form of my full name "Matt A. Tobin" or my username "mattatobin" or simply as "Tobin".

There is of course reasons (some even valid) behind it but that would detract from the pretentious nature of the request 8-)

Peace!

PS no apology is needed as obviously no one would be able to know this until I said something...
Off-topic:
Thanks for explanations ( rien compris désolé ) :D

Locked