# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)
#---------------ExExceptions permissions ( Set sites permissions )  -----------
#
# Dependencies :  -
#   Site             :     https://addons.mozilla.org/en-us/firefox/addon/exexceptions/
# Resources	: - exexcept.jar , exexcept.manifest , exexcept.js.
# Preferences : extensions.exexceptions.full , extensions.exexceptions.URL .
# previews   : https://addons.cdn.mozilla.net/img/uploads/previews/full/21/21079.png
#		 https://addons.cdn.mozilla.net/img/uploads/previews/full/21/21080.png
#
#  Author :  	Nag. MATSUI
#  Version: 11.01.11.01 .
#  2012-12-27     /  By  Merlin .
#
###############################################################

ExExPermission{
menugrayed=(hostname($URL)=="");
if(($ARG == "page")+($ARG=="link")){
$HostAdd=  ($ARG=="page")? hostname( $URL ):hostname( $LinkURL );
}
else{$HostAdd="";}
setpref(STRING,"extensions.exexceptions.URL",$HostAdd);
$OpenURL="chrome://exexcept/content/exexcept.xul";&OpenURL_InNewWindow;
}
ExExPermission_frame{
menugrayed=(hostname($URL)=="");
setpref(STRING,"extensions.exexceptions.URL",$FrameURL);
$OpenURL="chrome://exexcept/content/exexcept.xul";&OpenURL_InNewWindow;
}
ExExPermission_BuildMenu{
setmenu(Document,macro,"ExEx Permission page","ExExPermission(page)",-1);
setmenu(LinkOpenExternal,macro,"ExEx Permission Link","ExExPermission(link)",-1);
setmenu("&Tools",inline,ExExPermission,-1);
setmenu(ExExPermission,macro,"ExEx Permission","ExExPermission()");


setmenu("&Frame",macro,"ExEx Permission frame",ExExPermission_frame);
}


$OnInit=$OnInit."ExExPermission_BuildMenu;";
# --------------------------------------
$macroModules=$macroModules."ExExPermission;";