pref("kmeleon.plugins.macros.proxy1.name", "Benutzerdefinierter Proxy 1");
habe nachgesehen - sie sind in der I10n.js angelegt, kann man aber in der prefs.js nachschreiben also für 4 und 5 ( während der browser aus ist ). Kann man auch in der about:config machen.
das von dir angesprochene nutze ich nicht. wie das macro ab 1.1 aussieht habe ich mir nicht genau angesehen, aber das erweitert sich u. U. allein - cf. unten. Tschau - muß jetzt los. // sorry for writing German that is faster thx.
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)
# ---------- Custom Proxies ----------------------------------------------------------------------------------------
#
# Dependencies : main.kmm ($macroPrefBranch)
# Resources : -
# Preferences : kmeleon.plugins.macros.proxy[1-3].name
# kmeleon.plugins.macros.proxy[1-3].http
# kmeleon.plugins.macros.proxy[1-3].http_port
#
# ------------------------------------------------------------------------------------------------------------------
Proxy{
menuchecked=$ARG==0?(getpref(INT,$_Proxy_Active."type")==0)
(getpref(STRING,$_Proxy_Custom.$ARG.".http")==getpref(STRING,$_Proxy_Active."http"))*(getpref(INT,$_Proxy_Active."type")==1));
$ARG==0?setpref(INT,$_Proxy_Active."type",0):$_n=$ARG;
$ARG==0?statusbar(_("Connecting directly")):&_Proxy;
}
Proxy_Configuration{
$_i=1; while($_i!=4) &_Proxy_ConfigurationLoop;
}
# ----- PRIVATE
$_Proxy_Active="network.proxy.";
$_Proxy_Custom=$macroPrefBranch."proxy";
_Proxy{
$__srvr=getpref(STRING,$_Proxy_Custom.$_n.".http");
$__port=getpref(INT,$_Proxy_Custom.$_n.".http_port");
# When no server url is set, do not change anything!
$__srvr==""?0:setpref(STRING,$_Proxy_Active."http",$__srvr);
$__srvr==""?0:setpref(INT,$_Proxy_Active."http_port",$__port);
$__srvr==""?0:setpref(INT,$_Proxy_Active."type",1);
getpref(INT,$_Proxy_Active."type")==1?statusbar(sub("%url",getpref(STRING,$_Proxy_Active."http"),sub("%port",getpref(INT,$_Proxy_Active."http_port"),_("Connecting over proxy %url:%port")))):&Proxy_0;
}
_Proxy_ConfigurationLoop{
$_name=getpref(STRING,$_Proxy_Custom.$_i.".name");
$_srvr=getpref(STRING,$_Proxy_Custom.$_i.".http");
$_port=getpref(INT,$_Proxy_Custom.$_i.".http_port");
$_tit=sub("%s",$_name==""?$_i:$_name,_("HTTP Proxy Configuration"));
$__msg=sub("%n",$_i,_("Current settings for proxy %n:"))."\n\n".sub("%s",$_name,_("Server name:\t%s"))."\n".sub("%s",$_srvr==""?_("(not set)"):$_srvr,_("Server URL:\t%s"))."\n".sub("%s",$_port==0?_("(not set)"):$_port,_("Server port:\t%s"))."\n\n"._("Do you want to change these settings?");
$__key=confirm($__msg,$_tit,YESNOCANCEL,QUESTION); $__key==YES?&_Proxy_ConfigurationChange
$__key==NO?$_i=$_i+1:$_i=4);
}
_Proxy_ConfigurationChange{
$_name=prompt(_("Server name:"),$_tit,$_name);
$_name==""?0:setpref(STRING,$_Proxy_Custom.$_i.".name",$_name);
$_name==""?$_srvr="":$_srvr=prompt(_("Server URL:"),$_tit,$_srvr);
$_srvr==""?0:setpref(STRING,$_Proxy_Custom.$_i.".http",$_srvr);
$_srvr==""?$_port="":$_port=prompt(_("Server port:"),$_tit,$_port);
$_port==""?0:setpref(INT,$_Proxy_Custom.$_i.".http_port",$_port);
&_Proxy_BuildMenu;
}
_Proxy_BuildMenu{
# tools menu
$_p="Pro&xy"; $_m="Proxy(";
setmenu(PrivacySecurity,popup,$_p);
setmenu($_p,macro,"&Direct Connection",$_m."0)");
$_j=1; while($_j!=4) &_Proxy_BuildMenuLoop;
setmenu($_p,macro,"Con&figure...",Proxy_Configuration);
setmenu($_p,separator,"Con&figure...");
rebuildmenu($_p);
}
_Proxy_BuildMenuLoop{
setmenu($_p,macro,getpref(STRING,$_Proxy_Custom.$_j.".name"),$_m.$_j.")");
$_j=$_j+1;
}
$OnInit=$OnInit."_Proxy_BuildMenu;";
# ------------------------------------------------------------------------------------------------------------------
$macroModules=$macroModules."Proxy;";
Edited 1 time(s). Last edit at 01/25/2007 07:37PM by guenter.