[Greasemonkey] Changing Links without IDs
Jeremy Dunck
jdunck at gmail.com
Mon Mar 20 08:12:56 EST 2006
On 3/20/06, Vectorspace <vectorspace at ntlworld.com> wrote:
> use links=document.getElementsByTagName("a") to get an array of all
> links in the page
> use for(i=0;i<links.length;i++) to cycle through all links
>
> links[i].innerHTML is the text of the current link - use indexOf() to
a.href is the text of a link's URL. This is probably cleaner than
using innerHTML.
Do you want links to the usual references?
More information about the Greasemonkey
mailing list