On 2/26/2012 8:24 AM, LWChris@LyricWiki wrote:
or if that applies to too many elements you didn't want to affect, you
can add an unique class to that element with JavaScript:
elem = document.getElement... (however you do that)
elem.className += " gm_specialClass1" // Note the space in front of
that class name!
Since Firefox 3.6, you can use the preferred "classList" API to add,
remove, toggle, or check for a class.
elem.classList.add("gm_specialClass1");
It's cleaner, twice as fast, and you don't have to deal with adding a
space delimiter or checking if it already exists in the class list.
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/greasemonkey-users?hl=en.