Page 1 of 1

Firefox Extension for adding CSS?

Posted: Tue Nov 15, 2005 3:26 pm
by Ambush Commander
I'm currently limping by with GreaseMonkey, but I don't like how the original css gets loaded, and then the new loads on, causing the flash of unslightly style change.

So here's what I'm looking for:

Some websites have really atrocious color schemes. And that's a pity, because they have quite good XHTML. (::cough:: PHPPatterns ::cough::) Now, this makes it a pain to read, so why can't I override their stylesheet with one much nicer on the eyes?

GreaseMonkey is way too powerful a tool for me: the application of arbitrary JavaScript after a page is loading: one, is totally unnecessary, and two, causes the flash of badly styled content.

So, ideally, the extension would load the stylesheet for all the pages of a website, and use that to override all of the supplied styles. A slightly less ideal solution would be to simply disable styling for certain websites (you know it's gotten bad when the unstyled page looks better than the styled one).

Unfortunantely, I don't know how to concisely express this is a few words. Anyone know of a FireFox extension that does this?

Posted: Tue Nov 15, 2005 3:35 pm
by Roja
What you really want is user-applied stylesheets.

I know Opera does it really well, but I've never looked into the same for Firefox.

In a nutshell, it simply replaces the site's CSS with yours. Much easier than writing a Greasemonkey script.

Sorry I couldnt help more, but maybe that will put you on the right path..

Posted: Tue Nov 15, 2005 3:40 pm
by Charles256
wait till I get home. I have just such an extension..... though I hardly ever take advantage of it...heh

Posted: Tue Nov 15, 2005 3:48 pm
by trukfixer
I believe the web developer extension will do the job - I have it, but have never tried it out as yet.. so I dont know i fthat is what you need..

Posted: Tue Nov 15, 2005 3:55 pm
by Ambush Commander
Actually, I have that extension.

It just doesn't do it automatically.

Posted: Tue Nov 15, 2005 6:46 pm
by RobertPaul
You want ChromEdit. Add your desired CSS to your userContent.css file. Unfortunately there are a couple 'gotchas:'

1) Unless the site has a unique id for the body i.e. (<body id="website">), you risk affecting other sites. Per-site userContent isn't available until Firefox 1.5 (though rumors say it should be out today or tomorrow).

2) Each attribute needs an !important after it. i.e. background-color: white !important;

Other than that, it's seamless.

There's got to be a way to do it via an extension (an XUL Overlay of some sort, I would think) but I've yet to figure it out.