codewzrd (owner)

Forks

Revisions

gist: 9499 Download_button fork
public
Description:
delicious
Public Clone URL: git://gist.github.com/9499.git
Embed All Files: show embed
delicious.js #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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&notes=' +
               CmdUtils.getSelection() +
               '&';
 
    if(!window.open(addr + 'noui=1&jump=doclose', windowName, windowFeature))
    {
      location.href=addr + 'jump=yes';
    }
  }
});