On Wed, May 26, 2010 at 10:40:09AM -0400, Anthony Lieuallen wrote: > On 05/26/10 10:37, Richard Zidlicky wrote: >> My only idea is that the problem is that the DOM is loaded which >> triggers the script and some miliseconds later some CSS is loaded .. >> However I am not sure how to verfiy that this is indeed the problem? >> .. Assuming this would be the problem is it possible to add some kind >> of event listener that would rerun the script after some CSS has been >> loaded? Which event listener? > > If this is the problem, the way to verify would be to fix it and see if > it works, because the fix is easy. Search for css "specificity" -- you > want to make your rules more specific than any other rule that might > override it.
I want to specifically override only those rules that define white background. So I can not in advance define a css rule with the important attribute because I do not know (in the general case) which one to override. Redefining all backgrounds as easy as it is would be an ugly overkill that breaks too many sites. This was the reason I am trying to do this with a userscript and not userstyle after all. > Your problem might really be that you're assigning to the javascript > style property, and then after your script runs, another does and > overwrites that value. If that is what's happening, you'll need to > rethink your methodology. it is not another script changing the value becase I use almost all sites with Noscript/JS=off. I could deal with the rest in some more special way. So it seems I need something that triggers my script again after some more css has been loaded. Richard -- 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.
