MediaWiki:Gadget-CatWatch.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
mw.Api, uniformato stile commenti
Maintenance: Remove use of internal wgMonthNamesShort data. phab:T219340
 
(Una versione intermedia di un altro utente non mostrate)
Riga 25:
errorGet: 'Error retrieving',
msgConfig: 'Category watchlist not found. Do you want to create a new one?',
monthNames: [ "", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ],
monthNames: 'wgMonthNames',
category: 'Category'
},
Riga 31:
errorGet: 'Errore nel leggere',
msgConfig: 'Non hai ancora una lista di categorie da controllare. Vuoi crearne una?',
monthNames: ["","gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],
monthNames: 'wgMonthNamesShort',
category: 'Categoria'
}
Riga 120:
function makeTimestamp( text ) {
var months, month, date = text.split( ' ' );
months = mw.config.get( msg( 'monthNames' ) );
month = months.indexOf( date[ 1 ] );
return month !== -1 ? ( date[ 2 ] + '-' + padleft0( month ) + '-' + padleft0( parseInt( date[ 0 ], 10 ) ) + 'T00:00:00Z' ) : null;
Riga 181:
hours = date.getHours();
minutes = date.getMinutes();
months = mw.config.get( msg( 'monthNames' ) );
return {
date: date.getDate() + ' ' + months[ date.getMonth() + 1 ] + ' ' +
Riga 245:
// Se la pagina corrente è Speciale:OsservatiSpeciali
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Watchlist' ) {
mw.loader.using( [ 'mediawiki.api', 'mediawiki.util' ], )
.done( function () {
// ottiene la lista delle categorie da monitorare.
getUserConfig( function ( categories ) {
// Parsifica OsservatiSpeciali.
var watchlist = parseWatchlistDOM();
// Per ogni categoria da monitorare
$.each( categories, function ( i, category ) {
// ottiene la lista delle pagine in quella categoria.
getCategoryPages( category, watchlist.oldestDate, function ( categorymembers ) {
// Per ogni pagina nella categoria monitorata
$.each( categorymembers, function ( i, page ) {
// aggiunge la pagina a OsservatiSpeciali.
watchlistAdd( watchlist, page, category );
} );
} );
} );
} );
} )
.fail( function () {
console.error( 'Impossibile avviare l\'accessorio CatWatch.' );
} );
} );
}
} );