[Greasemonkey] URL redirects

Julien Couvreur julien.couvreur at gmail.com
Fri Apr 22 17:33:43 EDT 2005

On 4/22/05, Alf Eaton <alf at hubmed.org> wrote:
> 1) Is there an easier way to write these patterns, perhaps as an array
> of 'matched URL', 'redirect URL' pairs that can be looped through?

I don't see how to avoid looping thru, but using
location.href.replace(...) would make the code shorter.

More info at: http://www.devguru.com/Technologies/ecmascript/quickref/string_replace.html

Here's a simple application of replace:
javascript:window.location.href.replace(/devguru/gi, "test"); 


More information about the Greasemonkey mailing list