K-Meleon
KMeleonWiki > Resources > MacroLibrary > KmmUrlTea
Submitted by: rstlne
Notes:
Generate a short URL from a page or link using urlTea. Hit Ctrl-F12 to generate a short URL of the current page or use the urlTea command in the document or link popup menus.
This macro is similar to the bookmarklet provided by urlTea. 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):
# urltea.kmm # # Macros for generating a short URL from a page or link using urlTea. _urltea{ $OpenURL="http://urltea.com/create/?url=".urlencode($_urltea); &OpenURL_InNew; } urltea_page{ menugrayed=(hostname($URL)==""); $_urltea=$URL; &_urltea; } urltea_link{ $_urltea=$LinkURL; &_urltea; } _urltea_buildmenu{ setmenu(Document,macro,"urlTea of page",urltea_page,-1); setmenu(LinkPopup,macro,"urlTea of link",urltea_link,-1); setmenu(FrameLinkPopup,macro,"urlTea of link",urltea_link,-1); } _urltea_buildaccel{ setaccel("CTRL VK_F12", "macros(urltea_page)"); } $OnInit=$OnInit."_urltea_buildmenu;_urltea_buildaccel;"; $macroModules=$macroModules."urltea;"; # vim:set tw=0: # -- The End --