K-Meleon
KMeleonWiki > Resources > MacroLibrary > KmmGNote
Submitted by: rstlne
Notes:
Google Notebook is Google's notetaking service. It comes with a bookmarklet that helps you bookmark and clip from pages into Google Notebook note entries.
One problem with the bookmarklet is it doesn't work if you have your bookmark options set to open bookmarks in a new layer. This macro solves that problem and works even with that bookmark option set. Invoke the macro from the Document or Selected Text popup menus.
Open your User Macro Folder (Edit > Configuration > User-Defined Macros) or your Macro Folder (Edit > Configuration > Macros) and create the following text file(s):
# gnote.kmm # # Macro equivalent for the "Note This" bookmarklet from Google Notebook. It is # the same as the bookmarklet provided by Google, except that the macro works # even if you have set your bookmark options to open bookmarks in a new layer. gnote_go { # Temporarily turn off popup blocking. $__blockpref="dom.disable_open_during_load"; $__b=getpref(BOOL,$__blockpref); setpref(BOOL,$__blockpref,false); $__s="(function(){var w=window;var d=document;"; $__s=$__s."var g=w.open('about:blank','gnotesWin','location=0,menubar=0,scrollbars=0,status=0,toolbar=0,width=300,height=300,resizable');"; $__s=$__s."var s=d.createElement('script');"; $__s=$__s."s.setAttribute('src','http://www.google.com/notebook/bookmarkletPoster?zx='+(new Date()).valueOf());"; $__s=$__s."d.body.appendChild(s);"; $__s=$__s."w.setTimeout(function(){w.blur();g.focus();}, 100)}).call({});"; injectJS($__s); # Restore popup blocking if it was turned on previously. setpref(BOOL,$__blockpref,$__b); } _gnote_buildmenu{ setmenu(Document,macro,"Note This (Google Notebook)",gnote_go,-1); setmenu(SelectedText,macro,"Note This (Google Notebook)",gnote_go,-1); } $OnInit=$OnInit."_gnote_buildmenu;"; $macroModules=$macroModules."gnote;"; # vim:set tw=0: # -- The End --