JavaScript Link Analyzer for Luminis


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. var anchors = document.getElementsByTagName("a");
  2. var anchorHrefs = [];
  3. var linktext = [];
  4. var nexturl = new RegExp('[^"]*([^"]*tag[^"]*render.userLayoutRootNode.uP)[^"]*frm=');
  5. for (var i=0; i<anchors.length;i++)
  6. {
  7. if ( anchors[i].href.match(nexturl) )
  8. {
  9. //anchorHrefs.push(anchors[i].href+"\n");
  10. //linktext.push(anchors[i].innerHTML+"\n");
  11. //anchors[i].style.borderStyle='double';
  12. //anchors[i].style.borderColor='green';
  13. console.log(anchors[i].innerHTML + ' = ' + anchors[i].href + '\n');
  14. }
  15. }
  16. alert(anchorHrefs);
  17. alert(linktext);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.