Modify Inline Styling, Multi-Elements Deep

Strontiumdog

New Member
I'm attempting to modify the coloring of a CometChat on a website which will remain anonymous due to having a non-modified CometChat. I just want to change the coloring, but prefer to use Greasemonkey over a User Styling extension due to not wanting to install a single extension for a single page.I've changed the background color so that it is black, which is fine until I go to modify the default text color (Black), to be white.
The system appears to style text based on the color in a Cookie, but it uses an Inline Style on a span.I can't figure out how to modify only the Inline Style where it is "color:#000000" (No, they don't have an appending ";") without changing all other colors, and removing a feature from the chat.I tried:
  • Using jQuery's \[code\].attr\[/code\] to find the value, then apply a class which has an \[code\]!important\[/code\] color.
  • Using \[code\].attr\[/code\] to change the color directly.
I Also tried \[code\]span[style="color:#000000"]\[/code\] and a few other methods, nothing has worked so far.One thing I noticed is that while trying to \[code\]alert()\[/code\] to see if it's working at all (In some attempts during \[code\].each\[/code\]), it wouldn't create the alert. The only reason that I can think of is that it is several Div's deep into the document. (\[code\]html > body > div#container > div#currentroom > div#currentroom_left > div#currentroom_convo > div#currentroom_convotext > div > div.cometchat_chatboxmessage > span.cometchat_chatboxmessagecontent > span\[/code\] (The one I wish to Edit) )
 
Back
Top