MediaWiki:Gadget-QuickDelete.js: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
Nuovo tool |
Nessun oggetto della modifica |
||
Riga 11:
// ==Automatic 'nominate for deletion', 'mark no license', 'mark no permission', 'mark no source' scripts==
/* <source lang="javascript"><nowiki> */
// Configuration
Riga 19:
// String constants
nfd_text = "
nfd_tooltip = "
nfd_prompt = "
nfd_delReq = "Commons:Deletion_requests"; //TODO: Al momento non viene usato. Aggiungere se avremo questa pagina in futuro
nfd_deleteTemplate = "
nfd_idwTemplate = "cancellazione"; //TODO: Al momento non viene usato. Aggiungere se avremo questa pagina in futuro
mns_tooltip = "Segna questa immagine come mancante di informazioni sulla fonte";
mnl_tooltip = "Segna questa immagine come mancante di informazioni sulla licenza";
mnp_text = "No permission"; //TODO: Al momento non viene usato. Aggiungere se avremo questa pagina in futuro
mnp_tooltip = "Mark this image as missing required permission information"; //TODO: Al momento non viene usato. Aggiungere se avremo questa pagina in futuro▼
▲mns_text = "No source";
mnx_lang = "lang?"; //TODO: Al momento non viene usato. Aggiungere se avremo questa pagina in futuro
mnx_langquery = "In which language should the message be given? "+ //TODO: Al momento non viene usato. Aggiungere se avremo questa pagina in futuro▼
▲mnl_text = "No license";
"Example: en for English, de for German, es for Spanish, etc. " + //TODO: Al momento non viene usato. Aggiungere se avremo questa pagina in futuro▼
"If the language does not exist for the template, a red link will be inserted. "; //TODO: Al momento non viene usato. Aggiungere se avremo questa pagina in futuro▼
▲mnp_tooltip = "Mark this image as missing required permission information";
▲mnx_langquery = "In which language should the message be given? "+
▲"Example: en for English, de for German, es for Spanish, etc. " +
▲"If the language does not exist for the template, a red link will be inserted. ";
Riga 49 ⟶ 44:
now.getUTCDate() < 10 ? timestamp += '0' + now.getUTCDate() : timestamp += now.getUTCDate();
nfd_datePage = nfd_delReq + "/" + timestamp;
var monthsArray = ["
var timestamp2 = monthsArray[now.getUTCMonth()] + " " + now.getUTCDate();
Riga 118 ⟶ 113:
var el = document.getElementById('filehistory')
if (!el) {
alert("getUploader:
return null;
}
Riga 127 ⟶ 122:
}
if (!el) {
alert("getUploader:
return null;
}
Riga 142 ⟶ 137:
if (m) return m[1];
}
alert("getUploader:
return null;
}
Riga 165 ⟶ 160:
function nfd_addDeleteTemplate() {
var reason = decodeURIComponent(getParamValue('reason'));
var txt = '{{' + nfd_deleteTemplate + '|
document.editform.wpTextbox1.value = txt + '\n' + document.editform.wpTextbox1.value;
document.editform.wpSummary.value = '
if (nfd_autosave) document.editform.wpSave.click();
}
Riga 176 ⟶ 171:
(document.editform.wpTextbox1.value.length > 0 ? '\n' : '') +
txt + '~~' + '~~\n';
document.editform.wpSummary.value = '
if (nfd_autosave) document.editform.wpSave.click();
}
function nfd_updateDelReq(target, reason) { //TODO: non usata
document.editform.wpTextbox1.value +=
(document.editform.wpTextbox1.value.length > 0 ? '\n' : '') +
Riga 188 ⟶ 183:
}
function nfd_updateDelReq2(target) { //TODO: non usata
document.editform.wpTextbox1.value +=
(document.editform.wpTextbox1.value.length > 0 ? '' : '==' + timestamp2 + '==\n') +
Riga 230 ⟶ 225:
function mnx_addTemplate(template, sorl) {
if (template == 'nsd') template='no source since';
if (template == 'nld') template='
if (template == 'npd') template='no permission since';
//TODO: non usata
// if (getParamValue('mnx_lang')) {
// template = template + '/' + getParamValue('mnx_lang'); // template = template + '|' + 'month={{subst:CURRENTMONTHNAME}}|day={{subst:CURRENTDAY}}|year={{subst:CURRENTYEAR}}';
}
Riga 240 ⟶ 236:
var txt = '{{' + template + '}}';
document.editform.wpTextbox1.value = txt + '\n' + document.editform.wpTextbox1.value;
// document.editform.wpSummary.value = 'marking image as missing essential ' + sorl + ' information. If this is not fixed this image might be deleted after 7 days.';
document.editform.wpSummary.value = 'segno l\'immagine come unverified. Manca la licenza. Se non corretta entro 7 giorni verrà cancellata.';
if (mnx_autosave) document.editform.wpSave.click();
}
Riga 248 ⟶ 245:
// If template to add is a not permission template, add {{image permission}}
if (template_type == 'mnp_mnp')
var txt = '{{subst:
// else, add the {{image source}} template
else
var txt = '{{subst:
// add in subst: if you want to subst these warnings
document.editform.wpTextbox1.value += '\n' + txt + '~~' + '~~\n';
document.editform.wpSummary.value = "
// this is the edit summary for when you leave the user warning on the talk page.
// you can change it if you want.
Riga 298 ⟶ 295:
/*else if (QuickDeleteLoadCount > 2) alert("Why do you have MediaWiki:Quick-delete.js loaded several times on your monobook.js??") //Silently ignore this */
// </
|