K-Meleon

KMeleonWiki > Resources > MacroLibrary > KmmIsGd

Submitted by: rstlne



Notes:

Generate a short URL from a page or link using is.gd. To invoke, use the is.gd command in the document or link popup menus.

This macro is similar to the bookmarklet provided by is.gd. 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):

isgd.kmm

# isgd.kmm
#
# Macros for generating a short URL from a page or link using is.gd.

_isgd{
$OpenURL="http://is.gd/create.php?longurl=".urlencode($_isgd_url);
&OpenURL_InNew;
}

isgd_page{
menugrayed=(hostname($URL)=="");
$_isgd_url=$URL; &_isgd;
}

isgd_link{
$_isgd_url=$LinkURL; &_isgd;
}

_isgd_buildmenu{
setmenu(Document,macro,"is.gd of page",isgd_page,-1);
setmenu(LinkPopup,macro,"is.gd of link",isgd_link,-1);
setmenu(FrameLinkPopup,macro,"is.gd of link",isgd_link,-1);
}

$OnInit=$OnInit."_isgd_buildmenu;";
$macroModules=$macroModules."isgd;";

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


Comments & Questions

K-Meleon

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