Utente:Daimona Eaytoy/Massblock.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
+validazione aggiuntiva sull'input, bellifico funzione spostando l'alert, cambio formato dei messaggi
m +param, beautifico
Riga 14:
blockAllowsTalkEdit;
 
// To add local messages change the values of this variables.
localMsg = {
'document-title': 'Il mass-blocker attira-trote',
'page-title': 'L\'attira-trote',
'abuse-disclaimer': '<b>Se abusi di questo strumento, è colpa tua e non mia!</b>',
'basic-data': 'Dati di base',
'blockusers': 'Utenti da bloccare (uno per riga):',
'talkmsg': 'Sostituisci la talk con, oppure aggiungi alla talk se il blocco non è infinito (lasciare vuoto per non modificare la talk):',
'upmsg': 'Sostituisci la pagina utente con (lasciare vuoto per non modificare la pagina utente):',
'block-options-label': 'Opzioni del blocco',
'further-options-label': 'Altre opzioni',
'common-reasons': 'Motivazioni comuni:',
'other-reason': 'Altra motivazione',
'extra-reason': 'Motivazione aggiuntiva:',
'exptime': 'Durata del blocco, in inglese (lasciare vuoto per blocco infinito):',
'summary-default': 'Utente bloccato.',
'talksummary': 'Oggetto per la modifica della talk:',
'talkprotect': 'Proteggi la talk:',
'upsummary': 'Oggetto per la modifica della pagina utente:',
'upprotect': 'Proteggi la pagina utente:',
'protect-reason-label': 'Motivazione per la protezione:',
'protect-reason-default': 'Utente bloccato.',
'anononly': 'Blocca solo utenti anonimi:',
'autoblock': 'Attiva autoblocco (solo per utenti registrati):',
'nocreate': 'Blocca la creazione di utenze:',
'noemail': 'Blocca email:',
'notalk': 'Blocca anche la modifica della talk:',
'override': 'Sovrascrivi eventuali blocchi:',
'submit-text': 'Scatena l\'inferno!',
'result-alert': 'Bloccati $1 utenti. Modificate $2 talk e $3 pagine utente. Protette $4 talk e $5 pagine utente.',
'failed-actions': 'Azioni non riuscite e relativi errori:',
'failure-help': 'aiuto'
};
 
/**
Riga 55:
 
// First trim everything
users = users.map( function ( s ) {
return s.trim();
} );
Riga 235:
 
var defaultMsg = {
'document-title': 'Tim\'s mass-blocking tool - Wikipedia, the free encyclopedia',
'page-title': 'Tim\'s mass-blocking tool',
'abuse-disclaimer': '<b>If you abuse this tool, it\'s <i>your</i> fault, not mine.</b>',
'basic-data': 'Basic data',
'blockusers': 'Users to block (one on each line, please):',
'talkmsg': 'Replace talk page with, or text to add if the expiry is not infinite (leave blank to leave no message):',
'upmsg': 'Replace user page text with (leave blank for no change):',
'block-options-label': 'Block options',
'further-options-label': 'Further options',
'common-reasons': 'Common reasons:',
'other-reason': 'Other reason',
'extra-reason': 'Other/additional reason:',
'exptime': 'Expiration time, in english (blank for indefinite):',
'summary-default': 'Blocked user.',
'talksummary': 'Edit summary for talk page edit:',
'talkprotect': 'Protect the talk (sysop level, infinite):',
'upsummary': 'Edit summary for user page edit:',
'upprotect': 'Protect the user page (sysop level, infinite):',
'protect-reason-label': 'Reason for protection:',
'protect-reason-default': 'Blocked user.',
'anononly': 'Block anonymous users only (IPs only):',
'autoblock': 'Enable autoblock (accounts only):',
'nocreate': 'Block account creation:',
'noemail': 'Block email:',
'notalk': 'Remove talk page access:',
'override': 'Override existing blocks:',
'submit-text': 'Block',
'result-alert': 'Blocked $1 users. Edited $2 talk pages and $3 user pages. Protected $4 talk pages and $5 user pages.',
'failed-actions': 'Failed actions with errors:',
'failure-help': 'help',
};
/**
* Get a localised messages, or the default one as fallback.
*/
function msg( msg ) {
return localMsg[ msg ] || defaultMsg[ msg ];
}