On 2013-05-27 11:51, LWChris@LyricWiki wrote:
Am 27.05.2013 11:10, schrieb cc:
Grab a reference to the <div>, then set its style.display property to
"none".
For example (untested):
var divFoobar = document.evaluate('//div[@class="foobar"]', document,
null, typeXPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
if (divFoobar) {
divFoobar.style.display = "none";
} else { /*complain*/ }
If you feel like it, you can actually delete the element, but most of
the time that isn't needed.
I don't know why you would use that complicated code.
If you're not going to do anything with the element, there is no
benefit from grabbing it, right? ;)
Meh, I'm just addicted to XPath :P
Seriously, though, there's probably half a dozen different ways to do this.
--
cc | pseudonymous | <http://carlclark.mp/>
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.