On Sat, 6 Dec 2008, esquifit <[EMAIL PROTECTED]> wrote:

> I played around with several pages and in all cases I got the error if
> and only if the css were hosted in a different domain.  For example in
> flickr, the page is loading CSS from l.ying.com.  When the script
> attempts to read the cssRules property of one of those stylesheets, it
> must effectively access the contents of a resource in another domain,
> therefore a security exception is triggered.

Is this a result of the GM sandbox? I tried repleacing the line

    ss = document.styleSheets;

with
    ss = unsafeWindow.styleSheets;

but that resulted in the "Security error" being reported a line earlier
on the attempt to get the length

    for (i = 0; i <ss.length; i++) {

> (Note that the *full domain* must coincide in order for it to work;
> for example the stylesheets for http://esquifit.myopenid.com/ are
> hosted under www.myopenid.com, thus leading to the exception even
> though the domain is myopenid.com in both cases).

As Firefox itself has no issue with this cross-domain CSS usage and
Firebug can show me all the lines of CSS irrespective of origin there must
be some way for me to get to the stuff being served up from l.yimg.com
too. Maybe GM_getResourceText or similar with appropriate meta-data
declarations would get it for me?

Regards, Trevor

<>< Re: deemed!


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to