Return to Snippet

Revision: 27383
at June 4, 2010 12:56 by jonahlyn


Initial Code
var anchors = document.getElementsByTagName("a");
var anchorHrefs = [];
var linktext = [];
var nexturl = new RegExp('[^"]*([^"]*tag[^"]*render.userLayoutRootNode.uP)[^"]*frm=');
for (var i=0; i<anchors.length;i++)
{
  if ( anchors[i].href.match(nexturl) )
  {
    //anchorHrefs.push(anchors[i].href+"\n");
    //linktext.push(anchors[i].innerHTML+"\n");
    //anchors[i].style.borderStyle='double';
    //anchors[i].style.borderColor='green';
    console.log(anchors[i].innerHTML + ' = ' + anchors[i].href + '\n');
  }
}
alert(anchorHrefs);
alert(linktext);

Initial URL

                                

Initial Description

                                

Initial Title
JavaScript Link Analyzer for Luminis

Initial Tags

                                

Initial Language
JavaScript