[Greasemonkey] HTML injection CSS clashes
Johan Sundström
oyasumi at gmail.com
Sat Jan 14 15:54:46 EST 2006
> There was some discussion in this list about that topic,
> unfortunatelly I don't know to which extent these ideas have eventually
> materialised into actual code:
Thanks. So to recap this, basically:
In http://www.mozdev.org/pipermail/greasemonkey/2005-August/005035.html
Aaron wrote a stand alone forceStyle() method to reset changed styles
for a given node to their default styles. For some reason, the method
was not soaked up in GreaseMonkey proper.
In http://www.mozdev.org/pipermail/greasemonkey/2005-August/005030.html
Mark Pilgrim presents MonkeyDo, which, among other things contains a
whopping huge forceStyle() implementation which on superficial
examination seems to apply default (or Mark's preferred) styles on a
substantial amount of css properties on an equally substantial amount
of HTML tags both tested for specifically, leaving the rest, if any,
as they were. Mark also introduces recursive application on the target
node's children here, which is a very nice touch and probably the
typical use case.
http://www.mozdev.org/pipermail/greasemonkey/2005-October/006327.html
has an independently developed class version of the single-node
forceStyle method by Mor Roses, which reuses the same iframe to reset
styles of multiple elements on consecutive calls.
http://www.mozdev.org/pipermail/greasemonkey/2005-October/006409.html
has Mor Roses' patch to add said class as a GM_uninheritCSS method.
In http://www.mozdev.org/pipermail/greasemonkey/2005-October/006442.html
Jeremy Dunck suggests renaming it to GM_styleFromBrowserCSS and not
adding the iframe node to the document element.
http://www.mozdev.org/pipermail/greasemonkey/2005-October/006455.html
- Roses submits a cleaned-up version which doesn't.
Then, basically, nothing happens and no discussion ensues, from what I
managed to grapple out of the archives. Should we continue from there
now, perhaps? I find this an essential tool for many of the scripts I
write and maintain.
--
/ Johan Sundström, http://ecmanaut.blogspot.com/
More information about the Greasemonkey
mailing list