MediaWiki:Gadget-QuickDelete.js: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica |
Nessun oggetto della modifica |
||
Riga 17:
// String constants
//nfd_text = "Cancella subito";
//nfd_tooltip = "Aggiungi il \"Cancella subito\"";
//nfd_prompt = "Qual è il motivo della cancellazione?";
//nfd_delReq = "Commons:Deletion_requests"; //TODO: Al momento non viene usato. Aggiungere se avremo questa pagina in futuro
//nfd_deleteTemplate = "cancella subito";
//nfd_idwTemplate = "cancellazione"; //TODO: Al momento non viene usato. Aggiungere se avremo questa pagina in futuro
//mns_text = "
//mns_tooltip = "
mnl_text = "
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
//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
//"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
//var now = new Date();
//var
//timestamp += '/';▼
//now.
▲timestamp += '/';
//nfd_datePage = nfd_delReq + "/" + timestamp;▼
//var monthsArray = ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"];▼
▲nfd_datePage = nfd_delReq + "/" + timestamp;
//var timestamp2 = monthsArray[now.getUTCMonth()] + " " + now.getUTCDate();▼
▲var monthsArray = ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"];
▲var timestamp2 = monthsArray[now.getUTCMonth()] + " " + now.getUTCDate();
// From [[en:Wikipedia:WikiProject User scripts/Scripts/addLink]]
Riga 139 ⟶ 138:
}
/*function nfd_nomForDel() {
var reason = prompt(nfd_prompt, '');
if (!reason) return;
Riga 154 ⟶ 153:
var editlk = document.getElementById('ca-edit').getElementsByTagName('a')[0].href;
document.___location = editlk + '&fakeaction=nfd_delete&reason=' + encodeURIComponent(reason);
}*/
/*function nfd_addDeleteTemplate() {
var reason = decodeURIComponent(getParamValue('reason'));
var txt = '{{' + nfd_deleteTemplate + '|motivo=' + reason + '}}';
Riga 162 ⟶ 161:
document.editform.wpSummary.value = 'Proposta immagine per la cancellazione';
if (nfd_autosave) document.editform.wpSave.click();
}*/
function nfd_addIdwTemplate(target) {
Riga 173 ⟶ 172:
}
/*function nfd_updateDelReq(target, reason) { //TODO: non usata
document.editform.wpTextbox1.value +=
(document.editform.wpTextbox1.value.length > 0 ? '\n' : '') +
Riga 179 ⟶ 178:
document.editform.wpSummary.value = 'Nominating [[' + target + ']]';
if (nfd_autosave) document.editform.wpSave.click();
}*/
/*function nfd_updateDelReq2(target) { //TODO: non usata
document.editform.wpTextbox1.value +=
(document.editform.wpTextbox1.value.length > 0 ? '' : '==' + timestamp2 + '==\n') +
Riga 187 ⟶ 186:
document.editform.wpSummary.value = 'Nominating [[' + target + ']]';
if (nfd_autosave) document.editform.wpSave.click();
}*/
/*function nfd_onload() {
if (wgNamespaceNumber == 6) { //NS_IMAGE
addLink('p-tb', 'javascript:nfd_nomForDel()', nfd_text, 'nom-for-del', nfd_tooltip);
Riga 202 ⟶ 201:
else if (fakeaction == 'nfd_add2')
nfd_updateDelReq2(decodeURIComponent(getParamValue('target')));
}*/
// ??
Riga 221 ⟶ 220:
// Add template to image description page
// sorl = "source", "permission" or "license"
function mnx_addTemplate(
//
//TODO: non usata
// if (getParamValue('mnx_lang')) {
Riga 232 ⟶ 229:
// the edit summary for when you mark the image. You can change it if you want.
var txt = '{{
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.';
Riga 258 ⟶ 255:
function mnx_onload() {
if (wgNamespaceNumber == 6) { //NS_IMAGE
// addLink('p-tb', 'javascript:mnx_mark(\'mns_mns\', \'mnx_warn\', \'en\')', mns_text, 'mark-no-source', mns_tooltip, null, null, 'javascript:mnx_mark(\'mns_mns\', \'mnx_warn\', prompt(\'' + mnx_langquery + '\', wgUserLanguage))', mnx_lang);
// addLink('p-tb', 'javascript:mnx_mark(\'mnp_mnp\', \'mnx_warn\', \'en\')', mnp_text, 'mark-no-permission', mnp_tooltip, null, null, 'javascript:mnx_mark(\'mnp_mnp\', \'mnx_warn\', prompt(\'' + mnx_langquery + '\', wgUserLanguage))', mnx_lang);
addLink('p-tb', 'javascript:mnx_mark(\'mnl_mnl\', \'mnx_warn\', \'en\')', mnl_text, 'mark-no-license', mnl_tooltip, null, null
}
var fakeaction = getParamValue('fakeaction');
var template_type = getParamValue('template_type'); // Fetch what template to add
if (fakeaction == 'mnl_mnl'){
mnx_addTemplate('nld','license');
|