There are 2 previous versions of this script.
// ==UserScript==
// @name Delicious.com Thumbs
// @description A script to add thumbnails previews to the links posted on the new delicious.com
// @include http://delicious.com/*
// @exclude http://delicious.com/
// @exclude http://delicious.com/rss/*
// ==/UserScript==
(function(){
function init() {
if(document.getElementById('bookmark-list-options').getAttribute('class') == 'FULL') {
add_style();
var tags = document.getElementsByTagName('a');
for (i = 0; i < tags.length; i++) {
if(tags[i].getAttribute('class') == 'taggedlink') {
add_thumbnail(tags[i]);
}
}
}
}
function add_thumbnail(a) {
var thumb = document.createElement('img');
thumb.setAttribute('src','http://open.thumbshots.org/image.pxf?url=' + a.href);
thumb.setAttribute('class','thumb');
var bm = a.parentNode.parentNode.parentNode;
bm.parentNode.insertBefore(thumb, bm);
}
function add_style() {
var style = document.createElement('style');
style.type = 'text/css';
style.appendChild(document.createTextNode(
'ul.bookmarks li.post .meta {clear:none; float:none;}\n'+
'ul.bookmarks li.post .description {clear:none; width:auto; max-width:100%;}\n'+
'.thumb {float:left; width:120px; height:90px; margin-right:5px; border-color:#D5D5D5 !important; border-width:0 1px 1px !important;}'
));
document.body.appendChild(style);
}
init();
}())
