[Greasemonkey] Document.domain still broken?

Bill Hilke whilke at gmail.com
Fri Nov 18 15:43:45 EST 2005


a quick update.

I took the html source for http://www.myspace.com and saved it to a
local html file.

if I load that html file in FF 1.5RC3 it loads my script without
trouble, but still throws an exception if I copy that html file to a
remote web server and try and load my script.

the exception is being throw from greasemonkey.js around line 247 in 
Components.utils.evalInSandbox(code, sandbox);

I think this comes from an internal FF object, and I'm not setup to
start debugging through that.

anyone got a clue as to why the same html won't work from a remote site?

-Thanks.
Bill

On 11/18/05, Bill Hilke <whilke at gmail.com> wrote:
> I'm not sure it was just my guess since the site I was trying to get a
> script to run on set the document.domain property.
>
> here is a sample script that just alerts the current window.location
> using unsafeWindow, it runs on every website.
>
> ------------------
>
> // ==UserScript==
> // @name          Test Script
> // @namespace     http://test/script
> // @include       *
> // ==/UserScript==
>
> alert(unsafeWindow.location);
>
>
> ---------------------
>
> install that and browse to www.myspace.com
>
> you'll notice it alerts for all the ad pages, but you'll never get an
> alert for the myspace.com page and if you look in the javascript
> console you'll see "Error: Permission denied to get property
> Window.alert".
>
> if document.domain isn't the problem then I'm not sure what is,
> versions below 1.5 run scripts off myspace.com without any problems.
>
> got any ideas?
>
> -Thanks.
>
> On 11/18/05, Aaron Boodman <zboogs at gmail.com> wrote:
> > 1.5 is indeed Gecko 1.8. Are you sure that it's document.domain that
> > causing your problem? Have you isolated it?
> >
> > If so, send a reduced test case please.
> >
> > - a
> >
> > On 11/18/05, Bill Hilke <whilke at gmail.com> wrote:
> > > Are scripts still not working on sites that set document.domain in FF
> > > 1.5RC3? I'm running the latest GM from CVS and still seems to be
> > > broken even though the FireFox bug has been fixed since Sept.
> > >
> > > The bug says the fix was checked into the main 1.8 Mozilla branch, is
> > > RC3 not built off that branch?
> > >
> > > Thanks for any info.
> > > -Bill
> > > _______________________________________________
> > > Greasemonkey mailing list
> > > Greasemonkey at mozdev.org
> > > http://mozdev.org/mailman/listinfo/greasemonkey
> > >
> > _______________________________________________
> > Greasemonkey mailing list
> > Greasemonkey at mozdev.org
> > http://mozdev.org/mailman/listinfo/greasemonkey
> >
>


More information about the Greasemonkey mailing list