[Greasemonkey] URL redirects

Edward Lee edilee at gmail.com
Sat Apr 23 13:00:09 EDT 2005

On 4/22/05, Edward Lee <edilee at gmail.com> wrote:
> var redirects = new Array();
> function addRedirect(match, target) {


Ehh... I have no idea why I created an array of hashes to later loop
through to check the location. The function could just check the
location the first time it gets the location and replacement instead
of saving it for later... Actually I think I know why ;) You were
asking for a way to put the data into an array, but I figured it would
be nicer as a hash, but to prevent having to deal with the hash label
and other syntax, I provided a function to do all that. Let me know if
you want a cleaner version that checks the location right away, or
maybe you just want to pass it a whole big array that you manually

Btw, what do people think about posting back to greasemonkey mailing
list compared to just replying to the original sender? Making it
viewable on the mailing list lets other people see what others are
doing (and mistakes! ;)) but it does possibly generate a lot of


More information about the Greasemonkey mailing list