[Greasemonkey] HTML injection CSS clashes

Johan Sundström oyasumi at gmail.com
Sat Jan 14 23:42:18 EST 2006


>> I have made a new version against the head CVS :-)
>> syntax is: GM_uninheritCSS(ElementToClean);
>
> A small update :)

Might I suggest adding Mark Pilgrim's recursive traversal mode to
this, while at it? I can't think of any use case where you would want
to clean just the top node of an inserted tree fragment; adding
something like this at the end of the function would relieve us of
having to do it in every user script using it instead:

  for( var i=0; i<node.childNodes.length; i++ )
    GM_uninheritCSS( win, node.childNodes[i] );

--
 / Johan Sundström, http://ecmanaut.blogspot.com/


More information about the Greasemonkey mailing list