[Greasemonkey] Special casing data: URIs

Mook mook.moz at gmail.com
Thu Apr 14 16:52:18 EDT 2005


(Sorry for not replying to the original message - I was not a subscriber)

I am proposing dropping special support for data: URIs, since not all
of them are user scripts.  Instead, the URIs themselves can be fixed

1. Append the string "//.user.js" to the end of the script.  This is
treated as a JavaScript comment.

2. Do not use base-64 encoding (btoa()); use encodeURI() instead. 
This will not munge the last bit of text, so the URI actually will end
in .user.js  (Also has the side effect of making the URI longer, but
more readable - may hit a URI length limit, however)

I don't like assuming all data: URIs are user scripts, that's all. 
Feel free to ignore me of course - just a random bystander here :)

Too bad base64 does not have the dot (.) as a valid character... :p

mook.moz at gmail

More information about the Greasemonkey mailing list