[Greasemonkey] greasemonkey and changing css properties.

Mark Pilgrim pilgrim at gmail.com
Thu Aug 11 02:00:53 EDT 2005


On 8/11/05, Shaya Potter <spotter at cs.columbia.edu> wrote:
> I'd like to learn how to write a simple greasemonkey script to change
> css properties.

Write a Greasemonkey script that adds a stylesheet to the page that
redefines the problematic styles.

http://diveintogreasemonkey.org/patterns/add-css.html

So your code might look something like this:

// function addGlobalStyle() -- paste from linked page

addGlobalStyle('p { text-align: left ! important; } p.m { text-align:
left ! important; } p.s { text-align: left ! important; }');

Hope this helps.

-- 
Cheers,
-Mark


More information about the Greasemonkey mailing list