Aaron
Articles
Code
Darwin
Photos
Links
Resources
Resume
Software

Here is an updated version of the Javascript bookmarklet to add DuggMirror links to the Digg's mainpage. Add a new bookmark to your bookmarks bar and copy the following code into it's address location. When you visit Digg's mainpage, just click the bookmarklet and it will add [[Dugg]] links to each article.

javascript:if(location.href.indexOf("digg.com")%20&&%20!duggLinksHaveBeenAddded){%09var%20url,%20a;%20%09for(var%20i=0;%20i<15;%20i++){%09%09url=document.getElementById("diggs"+i).href.replace(/digg.com/g,"duggmirror.com");%09document.getElementById("enclosure"+i).innerHTML+="[[Dugg]]";}%09var%20duggLinksHaveBeenAddded=true;}

The earlier versions of this script added the [[Dugg]] links to the end of the link, but for some reason Digg's webdesigners no longer increment the value in the id of the title element. Normally they went title0, title1... but now they all appear as just title0.


0.073 secs Copyright © 2008 Aaron Linville