K-Meleon

KMeleonWiki > Resources > MacroLibrary > KmmFriendFeed

Submitted by: rstlne



Notes:

FriendFeed is a social media and RSS aggregator that takes links, blogs, and pictures that you've posted to popular social media services and collects them into one stream. FriendFeed also allows you to post links to your stream using a bookmarklet. Unfortunately, the bookmarklet works only if you have set your options so that bookmarks open in the same layer. It breaks if you have bookmarks set up to open in a new layer.

This macro works the same way as the bookmarklet but allows you to share links on FriendFeed no matter what your bookmark options settings are. Invoke it from the document popup menu.




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

friendfeed.kmm

# friendfeed.kmm
#
# Macro for sharing links at FriendFeed. (http://friendfeed.com) You need to be
# logged into FriendFeed before invoking this macro. It is the same as using
# FriendFeed's bookmarklet, except that the macro works even if you have set
# your bookmark options to open bookmarks in a new layer.

friendfeed_inject{
$_friendfeed_s="(function(){var e=document.createElement('script');";
$_friendfeed_s=$_friendfeed_s."e.setAttribute('type','text/javascript');";
$_friendfeed_s=$_friendfeed_s."e.setAttribute('src','http://friendfeed.com/share/bookmarklet/javascript');";
$_friendfeed_s=$_friendfeed_s."document.body.appendChild(e)})();";
injectJS($_friendfeed_s);
}

_friendfeed_buildmenu{
setmenu(DocumentPopup,macro,"Share on FriendFeed",friendfeed_inject,-1);
setmenu(FrameDocumentPopup,macro,"Share on FriendFeed",friendfeed_inject,-1);
}

$OnInit=$OnInit."_friendfeed_buildmenu;";
$macroModules=$macroModules."friendfeed;";

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


Comments & Questions

K-Meleon

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