K-Meleon

KMeleonWiki > Resources > MacroLibrary > KmmEvernote

Submitted by: rstlne



Notes:

Evernote is a hybrid online/offline note-taking application. It comes with a bookmarklet allowing you to clip web pages to an Evernote notebook. Unfortunately, that bookmarklet breaks if your bookmarks are set to open in a new layer. This macro does the same thing by injecting the same javascript that the bookmarklet uses and it works regardless of your bookmark settings.

Invoke this macro from the document popup menu. You do not need to be logged in to Evernote before you use the macro, although if you aren't logged in, Evernote will ask you to do so before saving the web clipping.




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

evernote.kmm

# evernote.kmm
#
# Macro for clipping a web page to Evernote. (http://www.evernote.com) It is the
# same as using Evernote's bookmarklet, except that the macro works even if you
# have set your bookmark options to open bookmarks in a new layer.

evernote_inject{
$__s="(function(){EN_CLIP_HOST='http://preview.evernote.com';";
$__s=$__s."try{var x=document.createElement('SCRIPT');";
$__s=$__s."x.type='text/javascript';";
$__s=$__s."x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+";
$__s=$__s."(new Date().getTime()/100000);";
$__s=$__s."document.getElementsByTagName('head')[0].appendChild(x);}";
$__s=$__s."catch(e){";
$__s=$__s."location.href=EN_CLIP_HOST+'/clip.action?";
$__s=$__s."url='+encodeURIComponent(location.href)+";
$__s=$__s."'&title='+encodeURIComponent(document.title);}})();";
injectJS($__s);
}

_evernote_buildmenu{
setmenu(Document,macro,"Clip to Evernote",evernote_inject,-1);
}

$OnInit=$OnInit."_evernote_buildmenu;";
$macroModules=$macroModules."evernote;";

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


Comments & Questions

K-Meleon

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