What's supposed to happen is if someone goes to this page:
http://www.gaiaonline.com/marketplac...rch/?sortBy=91
and click the Buy now, it would skip the next page by confirming all
in one click. Bypassing the second page, which on that page a password
is needed to type in and press "Buy Now", which confirms it.

So one click would be needed. I've changed the script to this:

// ==UserScript==
// @name GaiaOnline Link Rewriter
// @namespace www.nowhere.com/yet
// @include http://www.gaiaonline.com/gaia/vend.php*
// ==/UserScript==
var a=document.getElementsByTagName('a');
for(var i=0;i<a.length;i++)
{
a[i].href=a[i].href.replace(/^http:\/\/www\.gaiaonline\.com\/gaia\/
vend\.php\?mode=buy&(vend_id=\d+)&type=buy&f=confirm&(mystore=\d+)$/i,
"http://www.gaiaonline.com/gaia/vend.php?mode=buy&$1&type=buy&f=go&;
$2&pass=hardcodedpass");

}

Correcting the grouping that needs to be closed. I wish there would be
some indication of what's going wrong but I'm not getting any response
from this script.
On Jul 1, 11:28 am, cc <[email protected]> wrote:
> Well, your regex is missing a closing group parenthesis after
> |(mystore=\d+|. Does that fix it?
>
> If not, perhaps you could explain what's going wrong, exactly.
>
> (I haven't tried testing the resulting script, if you're wondering.)
>
> TheOne wrote:
> > // ==UserScript==
> > // @name GaiaOnline Link Rewriter
> > // @namespacewww.nowhere.com/yet
> > // @includehttp://www.gaiaonline.com/gaia/vend.php*
> > // ==/UserScript==
> > var a=document.getElementsByTagName('a');
> > for(var i=0;i<a.length;i++)
> > {
> > a[i].href=a[i].href.replace(/^http:\/\/www\.gaiaonline\.com\/gaia\/
> > vend\.php\?mode=buy&(vend_id=\d+)&type=buy&f=confirm&(mystore=\d+$/i,
> > "http://www.gaiaonline.com/gaia/vend.php?mode=buy&$1&type=buy&f=go&;
> > $2&pass=hardcodedpass");
>
> > }
>
> > Could someone help me to make it work?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to