K-Meleon

KMeleonWiki > Resources > MacroLibrary > KmmSGReader

Original code by: Thanh Vu (baysao»gmail)
Submitted by: desga2



Notes:

Macro to get a link to add feed to Google Reader or Google Homepage. I tested it in Kmeleon 1.5beta. I think it would be work on old version.


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

SGReader.kmm

# K-Meleon Macros 

(http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- Simply Google Reader ----------------------------
#
# Dependencies        : main.kmm
# Resources        : -
# Preferences        : -
#
# ----------------------------------------------------------------------

viewsgreader{
menugrayed=(hostname($URL)=="");
$_title=$TITLE==""?$URL:$TITLE;
$OpenURL="http://www.google.com/reader/view/feed/".$LinkURL;
&OpenURL_InNew;
}
addsgreader{
menugrayed=(hostname($URL)=="");
$_title=$TITLE==""?$URL:$TITLE;
$OpenURL="http://www.google.com/ig/add?feedurl=".$LinkURL;
$OpenURL=$OpenURL."&feedtitle=".urlencode($_title);
&OpenURL_InNew;
}

# ----- PRIVATE

_SGreader_BuildMenu{

setmenu($_SendTo_Link,macro,"&View feed in GoogleReader",viewsgreader);
setmenu($_SendTo_Link,macro,"&Add feed to GoogleReader",addsgreader);
}

$OnInit=$OnInit."_SGreader_BuildMenu;";

# --------------------------------------------------------------------------------------------------------
$macroModules=$macroModules."SGReader;"; 


Comments & Questions

K-Meleon

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