K-Meleon

KMeleonWiki > Resources > MacroLibrary > KmmTweetburner

Submitted by: rstlne



Notes:

Generate a short URL from a page or link using Tweetburner. To invoke, use the Tweetburner command in the document or link popup menus.

This macro is similar to the bookmarklet provided by Tweetburner. The difference is the macro works even if you've set your bookmark options so that bookmarks open in a new layer. That setting breaks the bookmarklet.




Open your User Macro Folder (Edit > Configuration > User-Defined Macros) or your Macro Folder (Edit > Configuration > Macros) and create the following text file(s):

tweetburner.kmm

# tweetburner.kmm
#
# Macros for generating a short URL from a page or link using Tweetburner.

_tweetburner{
$OpenURL="http://tweetburner.com/links/create?url=".urlencode($_tweetburner_url);
&OpenURL_InNew;
}

tweetburner_page{
menugrayed=(hostname($URL)=="");
$_tweetburner_url=$URL; &_tweetburner;
}

tweetburner_link{
$_tweetburner_url=$LinkURL; &_tweetburner;
}

_tweetburner_buildmenu{
setmenu(Document,macro,"Tweetburner of page",tweetburner_page,-1);
setmenu(LinkPopup,macro,"Tweetburner of link",tweetburner_link,-1);
setmenu(FrameLinkPopup,macro,"Tweetburner of link",tweetburner_link,-1);
}

$OnInit=$OnInit."_tweetburner_buildmenu;";
$macroModules=$macroModules."tweetburner;";

# vim:set tw=0:
# -- The End --


Comments & Questions

K-Meleon

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