Utente:Salvatore Ingala/commandline.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m bugfix
m aggiornamenti
Riga 54:
function autoComplete1(dict, string, failIfAmbiguous){
var found = ''
var done = false;
if ((string == "")||(string==null))
return string;
Riga 75 ⟶ 74:
function autoComplete2(dict, string, failIfAmbiguous){
var found = ''
var done = false;
var i;
if ((string == "")||(string==null))
return string"";
for (i = 0; i < dict.length; i++)
if (dict[i].indexOf(string) == 0){
if (!failIfAmbiguous)
return dict[i];failIfAmbiguous = true
if (found == '')
found = dict[i];
Riga 88 ⟶ 86:
return -1;
}
}
if (found != '')
return found;
Riga 176 ⟶ 175:
wpTextbox1=document.getElementById("wpTextbox1");
if (wpTextbox1 == null) return;
 
var argomento = autoCompleteArgument(getArg("Argomento"),false);
var arg = getArg("Argomento");
var pipepos = arg.indexOf("|");
if (pipepos == -1)
var argomento = autoCompleteArgument(getArg("Argomento")arg, false);
else
var argomento = autoCompleteArgument(arg.substring(0,pipepos), false) + "|" + autoCompleteArgument(arg.substring(pipepos+1), false);
 
TimenPr('{{S' + (((argomento != null)&&(argomento!='')) ? ('|' + argomento + '}}\n') : '}}\n'));
TimenSA('+stub; '); TimenME();
Riga 303 ⟶ 309:
.replace(/\n *<h6> *([^<]+?) *<\/h1> *\n/gi, "\n====== $1 =======\n")
;
TimenSA("Formattazioneformattazione; "); TimenMe();
}