Believe me or not, I used to use Pentadactyl to change the background color of about:blank, which is not short:
js <<EOF
window.change_tab_bg = function(id, color) {
var tab = tabs.getTab(id);
if (!tab)
return;
tab.linkedBrowser.contentDocument.body.style.backgroundColor = color;
}
EOF
au PageLoad 'about:blank' js change_tab_bg(<tab>-1, "#333");
" PageLoad isn't fired when browser is launched
:if getBrowser().contentDocument.location.href == 'about:blank'
js getBrowser().contentDocument.body.style.backgroundColor = "#333";
:endif
I don’t know why I didn’t think of something else, say userContent.css1?
@-moz-document url(about:blank){
body {
background-color: #333;
}
}
A clean solution, and really simple. You can also use it for about:newtab, if that’s your Firefox homepage, just replace the argument of url() with the URL.
[1] | Not to be confused with userChrome.css, which is used for Firefox’s interface’s look not websites’ looks. |
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.