Created
September 8, 2008 18:09
-
-
Save codewzrd/9499 to your computer and use it in GitHub Desktop.
delicious
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
name: "delicious", | |
description: "It is equivalent to the Delicious.com bookmarklet.", | |
icon: "http://delicious.com/favicon.ico", | |
homepage: "http://www.makadia.com", | |
author: { name: "Svapan Makadia", email: "codewzrd@hotmail.com"}, | |
help: "If you select some text, it will be placed in the notes field.", | |
preview: "Bookmark the current page to Delicious.com", | |
execute: function(){ | |
var document = Application.activeWindow.activeTab.document; | |
var windowName = 'deliciousuiv5'; | |
var windowFeature = 'location=yes,links=no,scrollbars=no,toolbar=no,width=550,height=550'; | |
var addr = 'http://delicious.com/save?url=' + | |
encodeURIComponent(document.location.href) + | |
'&title=' + | |
encodeURIComponent(document.title) + | |
'&v=5¬es=' + | |
CmdUtils.getSelection() + | |
'&'; | |
if(!window.open(addr + 'noui=1&jump=doclose', windowName, windowFeature)) | |
{ | |
location.href=addr + 'jump=yes'; | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment