Some of my scripts are "using" an old version of Greasemonkey?

46 views
Skip to first unread message

Gary

unread,
Jul 17, 2014, 4:17:56 AM7/17/14
to greasemon...@googlegroups.com
I don't quite understand the issue, but here's what I've got so far.

Basically, I've created a few dozen scripts for myself over the past few years. The scripts were created under different versions of Greasemonkey.

For the earlier scripts, their folder names are all in lowercase. And then after a certain version, they become capitalized.

Also, the big problem is that for some reason, some of the older scripts (such as the ones with their names all lowercased, but in addition to some capitalized ones too that are still quite old, like 1 year or more), they have problems when using @require in them. In a new script, for instance, I can easily use @require test.js (the test.js being a local file, located in the same directory as the script), but in the "older" scripts, I can't use this because when I use GM_getResourceText() on it, it just provides an error saying it cannot be found (or similar).

Now, why would these problems even occur? Doesn't a new version of Greasemonkey affect all scripts? Why do some of my older scripts behave differently from the newer ones? There must be somewhere where "Greasemonkey version + script information" is stored, that is perhaps outside the ./gm_scripts/ dir since the only other file is config.xml, which seems to be auto-generated all the time.

In the mean time, I have re-created some of my scripts by deleting them, then re-creating them as if they were brand new, but just copy and pasting my code back in them.

Perhaps someone can help me solve this mystery?
Thanks in advance!

Anthony Lieuallen

unread,
Jul 17, 2014, 9:18:35 AM7/17/14
to greasemon...@googlegroups.com
On Thu, Jul 17, 2014 at 4:17 AM, Gary <gary...@gmail.com> wrote:
> I can easily use @require test.js (the test.js being a local file, located
> in the same directory as the script)

The value for @require should be a URL, where the resource can be
downloaded from. Not a path on disk. If you edit an existing file to
specify a path on disk, Greasemonkey will try to download that as a
URL, fail, and then the resource will not be available.

http://wiki.greasespot.net/Metadata_Block#.40require

Gary King

unread,
Jul 17, 2014, 12:18:24 PM7/17/14
to greasemon...@googlegroups.com
I'm guessing @resource should act the same then? In any case, at the moment both @require and @resource work for files on the disk, and based on questions on Stack Overflow etc. it is a "hack" that is used for personal scripts (i.e. those not intended to be distributed).

Will this "hack" eventually be "fixed"/"closed"? Of course, I hope not...

In any case, do you perhaps know why some of my scripts work fine when adding new @require blocks while others don't?



--
You received this message because you are subscribed to a topic in the Google Groups "greasemonkey-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/greasemonkey-users/jllCw442IP4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to greasemonkey-us...@googlegroups.com.
To post to this group, send email to greasemon...@googlegroups.com.
Visit this group at http://groups.google.com/group/greasemonkey-users.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages