Try printf-debugging it by sticking GM_log statements around the
statement in the loop, e.g.
GM_log("after: " + elms[i].href);
would go after the statement. If you have to, run checks like using
indexOf() to see if the string you're looking for is in there in the
first place, etc.
Also, make sure the script compiles and runs to the end by sticking a
GM_log there ;-).
Finally, it occurs to me that these hrefs may be relative, e.g.
'?[LINK]' rather than 'http://www.anonym.to/?[LINK]'; check on that with
View Source or Firebug (tooltips and status bar will not help here).
On 2009-11-02 22:52, Jamie.ds wrote:
> i got
> var elms = getElementsByTagName('a');
> for( i in elms ){
> elms[i].href=unescape(elms[i].href.replace('http://
> www.anonym.to/?',''));
> }
>
> But it's still in the links.
>
> On Nov 2, 8:13 pm, qufighter<[email protected]> wrote:
>
>> var elms = getElementsByTagName('a');
>> for( i in elms ){
>> elms[i].href=unescape(elms[i].href.replace('something',''));
>>
>> }
>>
>> replace something with whatever it is you wish to delete.
>>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---