// ==UserScript==
// @name           View in Dumble
// @namespace      http://antrix.net/
// @description    Inserts a link in delicious to view page in Dumble
// @include        http://del.icio.us/*
// ==/UserScript==

function dumble() {
    var b='http://oohembed.com/dumble/?u='; 
    var u=document.location.href;
    m = /del\.icio\.us\/([\w\.]+)\/?/i.exec(u);
    if(m && m[1] != 'tag' && m[1] != 'network' && m[1] != 'subscriptions' && m[1] != 'url' && m[1] != 'for') {
       var go = b+m[1]; 
       n = /del\.icio\.us\/\w+\/(\w+)\/?/i.exec(u); 
       if (n) {
           go = go + '&t=' + n[1];
       } 
       var hd = document.getElementById("header-user-links").innerHTML + ' | <a href="' + go + '">view in <strong>dumble</strong></a>';
       document.getElementById("header-user-links").innerHTML = hd;
    }
}

window.addEventListener(
  'load', dumble, false
)
