Use GM_addStyle to create the new class 'ccc', with the CSS attributes you want.

GM_addStyle(".ccc { visibility: hidden; }");


Assuming myDiv is the element you want to add this new class to...

myDiv.classList.add('ccc');

or if you want to just flip the visibility state, regardless of what it currently is, use "toggle" instead of "add" on the classList.





On 10/2/2013 10:41 AM, Ben Stover wrote:
Assume I have the following HTML code (mind the blank inside!):

<div class="aaa bbb">
...
</div>

How can I assign a new GM CSS statement to this div element?
The following ("as usual") does NOT work:

GM_addStyle("div#aaa bbb { display: none !important; }");

Thank you
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 http://groups.google.com/group/greasemonkey-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to