document.getElementById('foobar').classList.add('new');On 3/29/2016 4:07 PM, 'Ben Stover' via greasemonkey-users wrote:
Assume I original web page has an element like <div id="foobar" class="aaa bbb ccc" .......> ...... </div> Now I want to replace (resp. more exactly add a class to this element. It should look like afterwards as follows: <div id="foobar" class="aaa bbb ccc new" .......> ...... </div> How do I do this with GM? The class sequence "aaa bbb ccc" is NOT unique but the ID. And the class adding should only take place for this ID. Ben
-- 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 https://groups.google.com/group/greasemonkey-users. For more options, visit https://groups.google.com/d/optout.
