[Greasemonkey] Greasemonkey 0.3

Aaron Boodman zboogs at gmail.com
Mon Apr 11 02:11:23 EDT 2005

I was having some trouble with arbitrarily long filenames on mac osx.
I did some searching and couldn't find simple definitions of filenames
that work across modern, popular OS's (NT, osx, and *nix).

So I said to myself "self, 24 is a nice round number". And that was that.

The characters are just those that I trusted to work on all OS's.
You're right, I could just use \w (or \W), I think it is defined as
precisely what I have there. Not sure why I didn't think of it.

On Apr 11, 2005 12:59 AM, Edward Lee <edilee at gmail.com> wrote:
> Any reasoning behind the characters and number of characters for the
> new file name? Mostly wondering about the toLower. Oh and probably
> could just use \W dropping the caseless matching, but maybe your way
> is more efficient (reduces quite a few cases..)?
> var base = script.name.replace(/[^A-Z0-9_]/gi, "").toLowerCase();
> base = base.substring(0, 24);
> --
> Ed
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey

More information about the Greasemonkey mailing list