From d88872164f4d34b5d3e1d14255df48380ffc94ca Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 27 May 2012 00:22:17 +0900 Subject: [PATCH] add ext bookmark-delicious --- _keysnail.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/_keysnail.js b/_keysnail.js index 67e6815..2c383f9 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -158,6 +158,12 @@ plugins.options["twitter_client.use_jmp"] = true; //////////////////////////////////////////// // my ext +ext.add("bookmark-delicious", function(){ + if (window.loadURI) { + loadURI("javascript:(function(){f='http://www.delicious.com/save?url='+encodeURIComponent(window.location.href)+'&title='+encodeURIComponent(document.title)+'¬es='+encodeURIComponent(''+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text))+'&v=6&';a=function(){if(!window.open(f+'noui=1&jump=doclose','deliciousuiv6','location=1,links=0,scrollbars=0,toolbar=0,width=550,height=585'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})()"); + } +}, "bookmark delicious"); + ext.add('view-page-source', function(){ window.content.location.href = "view-source:" + window.content.location.href; }, 'view page source');