[Greasemonkey] Suggestion: @min-version attribute

Mark Pilgrim pilgrim at gmail.com
Tue Apr 12 10:58:11 EDT 2005

On Apr 12, 2005 6:13 AM, Simon Willison <cs1spw at bath.ac.uk> wrote:
>  From a comment on my blog:
> http://simon.incutio.com/archive/2005/04/11/etiquette#comment7
> "Is anyone else getting "GM_xmlhttprequest is undefined" with that
> script? Also in response to Mark's comment , I think that the
> del.icio.us api specifies that any page that hits delicious one time
> per load is considered abusive. I think that would definitely apply in
> this case."
> The guy was running an older version of Greasemonkey. How about adding
> an optional @min-version attribute which specifies the minimum
> greasemonkey version required to use the script? That way, when a user
> tries to install a script that their Greasemonkey version doesn't
> support we can give them a warning.

Bad bad bad.  Use this instead:

if (!GM_xmlhttpRequest) { alert('You need to upgrade Greasemonkey to
run this script.'); return; }

Test features, not versions.


More information about the Greasemonkey mailing list