Preference window for userscripts

By devnull69 Last update Sep 30, 2009 — Installed 22,309 times.

Dumb problem

in
Subscribe to Dumb problem 2 posts, 2 voices



SomeLameGuy Scriptwright
FirefoxWindows

OK I'm a newbie to using @require, and the first call to USP.theScriptName is failing.

Here's the gist of what I did:

//==UserScript==
// @name My Script
// @namespace http://.../
// @include http://...
// @require http://userscripts.org/scripts/source/45988.use...
//==/UserScript==
...
try {
USP.theScriptName = 'My Script';
}
catch (ex) {
GM_log(ex);
return;
}
...
and I get this output in the gm log:
http://.../...: ReferenceError: USP is not defined

Any idea what I'm doing wrong? Thanks!

 
devnull69 Script's Author
FirefoxWindows

Hi,

the general problem with @require: It is only recognized during INSTALL of a script. It is not recognized if you add a new script.

Workaround: Save your script somewhere. Uninstall the original script. Install the copied script (that includes the @require). After that you will see two scripts in the gm_scripts path (your script and the @require'd one).

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel