Is there a bookmarklet for inserting printable link footnotes in Firefox?
July 13, 2004 6:42 AM   Subscribe

I love kokogiak's bookmarklet for inserting printable link footnotes at the bottom of pages. However, it's IE only. Does anyone know of a way to do this with Firefox?
posted by monju_bosatsu to Computers & Internet (2 answers total)
 
Best answer:
javascript:function x(){var anchors=document.getElementsByTagName('a');var links=[];for(var i=0;i<anchors.length;++i){var anchor=anchors[i];if(anchors[i].innerHTML.replace(/<[^>]+>/g,"").match(/\S/)){links.push(anchors[i]);anchor.parentNode.insertBefore(document.createElement("sup"),anchor.nextSibling);anchor.nextSibling.appendChild(document.createTextNode(links.length))}}var footnotes='';for(var i in links){var link=links[i];footnotes+='<li style=margin-bottom:3px;>'+link.innerHTML.replace(/<[^>]+>/g,"")+': <a href='+link.href+'>'+link.href+'</a>'}document.body.innerHTML+='<br style=clear:both;><div><hr>Link Footnotes:<ol>'+footnotes+'</ol></div><hr>'}; x();

posted by Khalad at 7:55 AM on July 13, 2004


Response by poster: You, sir, are my new best friend. Thanks!
posted by monju_bosatsu at 8:01 AM on July 13, 2004


« Older Do I Have Allergies?   |   Calculating the possible trajectory of a soccer... Newer »
This thread is closed to new comments.