K-Meleon

KMeleonWiki > Resources > MacroLibrary > MacroLibrary2 > del.icio.us

Submitted by: rstlne



Notes:

Macros for posting a bookmark to del.icio.us, a social bookmarks manager. The title and url are taken from the current page and the form for posting to del.icio.us will open up in a new window or tab or layer.

Hit F12 to post to del.icio.us.
Hit Shift-F12 to set the del.icio.us user name.
F12 will also prompt you for the del.icio.us user name if you haven't previously set one up.

Also accessible from the document popup menu. Accelerator definitions below may be omitted if not needed.


In Macros:

# --- del.icio.us macros ---

$de="kmeleon.general.deliciousUser";

SetDelicious{
$word=prompt("Set del.icio.us username to: ", "del.icio.us setup");
$word=="" ? "" : setpref(STRING, $de, $word);
}

RunDelicious{
$xul="http://del.icio.us/".$word."?v=3&jump=bookmarks&url=".$URL."&title=".$TITLE;
&XUL;
}

Delicious{
$word=getpref(STRING, $de);
$word=="" ? &SetDelicious : "";
$word=="" ? "" : &RunDelicious;
}

# --- End del.icio.us macros ---


In Menus:

Delicious{
 %ifplugin macros
 macros(Delicious, Post to del.icio.us)
 macros(SetDelicious, Setup del.icio.us user name)
 %endif
}
DocumentPopup{
 !Nav
 -
 macros(URL, Go to URL)
 macros(sendhotkey, Send this page to hotkey)
 !Save
 !Selected
 -
 !View Page
 !Fullscreen
 -
 !Delicious
}

FrameDocumentPopup{
 !Nav
 -
 macros(URL, Go to URL)
 macros(sendhotkey, Send this page to hotkey)
 !Save
 !Selected
 -
 :Frame
 -
 !View Page
 !Fullscreen
 -
 !Delicious
}


In Accelerators:

# --- del.icio.us hotkeys ---

%ifplugin macros
VK_F12 = macros(Delicious)
SHIFT VK_F12 = macros(SetDelicious)
%endif

# --- End del.icio.us hotkeys ---


Comments & Questions

serrapeptase

K-Meleon

(c) 2000-2010 kmeleonbrowser.org. All rights reserved.
design by splif.