[Greasemonkey] Incorrect namespace for setValue when multiple scripts affect a page

Matthias Bauer ml-greasemonkey-42imk83y at moeffju.net
Fri May 20 19:42:00 EDT 2005


On 20.05.2005 16:13 Nikolas Coukouma wrote:

>> Hm. Do the two scripts have empty @name? That would cause this problem.
>>
> Sorry, for this to occur:
> * @name matches. If @name is not provided, the filename (sans .user.js)
> is used (for example: //@name test and test.user.js will end up with the
> same name)
> * @namespace must match or be absent in both
> 
> I hope that made sense. Does your pair fit this criteria? I've been
> trying to reproduce this and I'm not having any luck.

Script A:

// ==UserScript==
// @name          dA Multiuser
// @namespace     http://moeffju.net/dA/hack/js/multiUser
// @description	  Easier management of multiple user accounts (e.g. groups)
// @include       http://*.deviantart.com/*
// ==/UserScript==


Script B:

// ==UserScript==
// @name          deviantPreview
// @namespace     http://DuelMonster.deviantart.com
// @description	  Popup Preview for ShoutBoard, Notes & Other Comment Boxes!
// @include       http://*.deviantart.com/*
// @exclude       http://chat.deviantart.com*
// @exclude       http://www.deviantart.com/users/loggedout
// ==/UserScript==


The problem then occurs on http://moeffju.deviantart.com/ - dA multiuser
should populate a select box with values from storage, but they come up
empty. Writing values (setValue('dA-multiuser.accounts')) puts them
under the
greasemonkey.scriptvals.http://DuelMonster.deviantart.com/deviantPreview.dA-multiuser.accounts
key, not under
greasemonkey.scriptvals.http://moeffju.net/dA/hack/js/multiUser/dA
Multiuser.dA-multiuser.accounts as before (and as intended).

-Matthias


More information about the Greasemonkey mailing list