K-Meleon

KMeleonWiki > Resources > MacroLibrary > KmmReadbag

Submitted by: rstlne



Notes:

Readbag is a Google App Engine web application that allows you to bookmark links for reading later. This macro will help you add a link to Readbag. Invoke this macro from the document or link popup menu. You need to be logged into your Google Account before you do that.

This macro is similar to the bookmarklet provided by Readbag. 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):

readbag.kmm

# readbag.kmm
#
# Macro for adding a link to Readbag.

_readbag{
$OpenURL="http://readbag.com/bm.do?v=1&url=".urlencode($_readbag_url);
$OpenURL=$OpenURL.($_readbag_title==""?"":"&name=".urlencode($_readbag_title));
&OpenURL_InNew;
}

readbag_page{
menugrayed=(hostname($URL)=="");
$_readbag_url=$URL;
$_readbag_title=$TITLE==""?$URL:$TITLE;
&_readbag;
}

readbag_link{
$_readbag_url=$LinkURL;
$_readbag_title=$LinkURL;
&_readbag;
}

_readbag_buildmenu{
setmenu(Document,macro,"Save page in Readbag",readbag_page,-1);
setmenu(LinkPopup,macro,"Save link in Readbag",readbag_link,-1);
setmenu(FrameLinkPopup,macro,"Save link in Readbag",readbag_link,-1);
}

$OnInit=$OnInit."_readbag_buildmenu;";
$macroModules=$macroModules."readbag;";

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


Comments & Questions

K-Meleon

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