[Greasemonkey] cnn permission error (GM 0.6.2.1 FF 1.5)

Jonas Galvez jonasgalvez at gmail.com
Thu Nov 3 03:51:12 EST 2005


Fabricio Zuardi wrote:
> I am trying to get the location.href from this webpage:
> 
> http://edition.cnn.com/2005/TECH/space/11/02/early.stars.ap/index.html
> 
> 
> But it always give me a permission error, I have made a simple 
> testcase script here:
> 
> http://mamata.com.br/greasemonkey/mytest.user.js
> 
> // ==UserScript== // @include       http://edition.cnn.com/* //
> ==/UserScript==
> 
> (function() {
> 
> GM_log(self.document.location) try{ alert(self.document.location) 
> }catch(er){ GM_log(er); }
> 
> })();

 From http://greaseblog.blogspot.com/:

     Greasemonkey 0.6.2 does not inject on websites which use the
     document.domain javascript property. Notable examples are
     search.ebay.com and yahoo.com. This is due to a Firefox bug which
     will be fixed before 1.5 ships.

 From http://i.cnn.net/cnn/.element/ssi/js/1.3/main.js:

     [...] if(cnnDocDomain) {document.domain = cnnDocDomain;} [...]


--Jonas Galvez


More information about the Greasemonkey mailing list