Re: Simply changing the background and font color

2,417 views
Skip to first unread message

RodMcguire

unread,
May 16, 2007, 3:29:52 PM5/16/07
to greasemonkey-users
On May 16, 2:39 pm, FrozenDice <frozend...@gmail.com> wrote:
> I want to write a greasemonkey script for a single website, and all I
> need it to do is change the background to white and the text to
> black. I also have never written a greasemonkey script before. Can
> someone help me here? It should be simple enough I just can't figure
> out how to get it done.

You need to know some CSS to do such things in general. In
Greasemonkey the whole script should be:

GM_addStyle("body { color: black !important; background-color: white !
important; }");

see
http://wiki.greasespot.net/GM_addStyle

(the "!important"s may not be needed)

The above should work if your target page only styles its body. If
internal parts such as divs are also colored styled, you may have to
restyle them too.


Your application really doesn't need Greasemonkey. It might be better
to do it in the Stylish extension because that applies styles before
the page is loaded, not after as Greasemonkey does which sometimes
causes an annoying flash.

https://addons.mozilla.org/en-US/firefox/addon/2108


BD

unread,
May 17, 2007, 3:59:44 AM5/17/07
to greasemon...@googlegroups.com
Check this out: http://snowcrest.net/donnelly/firefox/gmscripts/#colors

--
Which conspiracy theory do you believe?
The Government's Official Conspiracy Theory Story,
or one of the alternative conspiracy theories?
Demand Truth and Justice! http://www.Chico911Truth.org/

Reply all
Reply to author
Forward
Message has been deleted
0 new messages