[Greasemonkey] Basic JavaScript questions

The Chris Method thechrisproject at gmail.com
Thu Jun 30 09:03:12 EDT 2005


Okay, here's what I have so far:
http://thechrisproject.com/code/overheardclean.user.js

Lemme know what you think.

On 6/30/05, The Chris Method <thechrisproject at gmail.com> wrote:
> 
> Thanks for all the replies. I see a couple of things:
> 1) My understanding of what how a "read-only array" (the NodeList) acts 
> was wrong. It makes much more sense now. I think the best way to remove the 
> elements would be the while loop that always removed the first element in 
> the NodeList.
> 
> 2) Using the css looks way cleaner, and I'm gonna try that. I'll probably 
> be back with more questions. 
> 
> Thanks again everyone for your help.
> 
> On 6/29/05, Lenny Domnitser <ldrhcp at gmail.com> wrote:
> > 
> > Just keep killing the first one.
> > 
> > var headings = document.getElementsByTagName('h3');
> > while(headings.length) {
> > var heading = headings[0];
> > heading.parentNode.removeChild(heading);
> > }
> > _______________________________________________ 
> > Greasemonkey mailing list
> > Greasemonkey at mozdev.org
> > http://mozdev.org/mailman/listinfo/greasemonkey
> > 
> 
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/greasemonkey/attachments/20050630/70bf1e4c/attachment.htm


More information about the Greasemonkey mailing list