16,874
个编辑
LLWiki正在建设中,欢迎加入我们!
小 (// Edit via Wikiplus) |
小 |
||
// new: added 2012-09-19. Please translate.
// Use user language for i18n
'cat-a-lot-
'cat-a-lot-comment-label': wgULS('自定义编辑摘要','自定義編輯摘要'),
'cat-a-lot-edit-question': wgULS('请输入编辑摘要:','請輸入編輯摘要:'),
// Progress
'cat-a-lot-editing': 'Editing page',
'cat-a-lot-of': 'of ',
'cat-a-lot-removed-cat': 'Removed from category $1',
'cat-a-lot-return-to-page': 'Return to page',
// as in 17 files selected
'cat-a-lot-files-selected': '{{PLURAL:$1|1=One file|$1 files}} selected.',
'cat-a-lot-pe_file': '$1 {{PLURAL:$1|page|pages}} of $2 affected',
// Actions
'cat-a-lot-all': 'all',
'cat-a-lot-none': 'none',
// Summaries (project language):
'cat-a-lot-summary-add': 'Adding [[Category:$1]]',
'cat-a-lot-summary-copy': 'Copying from [[Category:$1]] to [[Category:$2]]',
'cat-a-lot-summary-move': 'Moving from [[Category:$1]] to [[Category:$2]]',
'cat-a-lot-summary-remove': 'Removing from [[Category:$1]]',
'cat-a-lot-prefix-summary': '使用Cat-a-lot小工具',
'cat-a-lot-using-summary': '
};
mw.messages.set( msgs );
init: function () {
// TODO: better extern project support for possible change-tag? (needs currently change after init)
if ( project === 'commonswiki' ) { mw.messages.set( { 'cat-a-lot-using-summary': '' } ); } else { // Reset
.appendTo( $head );
$container.one( 'mouseover', function () { // Try load on demand earliest as possible
mw.loader.load( [ '
} );
.insertBefore( $selections );
}
reCat = new RegExp( '^\\s*' + CAL.localizedRegex( 14, 'Category' ) + ':', '' );
} ) );
}
} );
},
}
$( '<a>' )
.text( msg( 'all' ) )
.on( 'click', function () {
}
$selectNone = $( '<a>' )
.text( msg( 'none' ) )
.on( 'click', function () {
$( this ).toggleClass( 'cat_a_lot_enabled' );
// Load autocomplete on demand
mw.loader.using( '
if ( !CAL.executed ) {
$.when( mw.loader.using( [
'
'mediawiki.api',
'mediawiki.jqueryMsg'
this.labels = this.labels.add( $( 'table.searchResultImage' ).find( 'tr>td:eq(1)' ) );
if ( this.settings.editpages ) { this.labels = this.labels.add( 'div.mw-search-result-heading' ); }
break;
case 'category':
file = file.length ? file : label.find( 'a[title]' );
var title = file.attr( 'title' ) ||
CAL.getTitleFromLink( file ) ||
CAL.getTitleFromLink( label.find( 'a' ) ) ||
CAL.getTitleFromLink( label.parent().find( 'a' ) ); // TODO needs optimization
if ( title.indexOf( formattedNS[ 2 ] + ':' ) ) { return [ [ title, label ] ]; }
} );
if ( $( '#cat_a_lot_comment' ).prop( 'checked' ) ) { this.summary = window.prompt( msg( 'edit-question' ), '' ); } // TODO custom pre-value
if ( this.summary !== null ) {
mw.loader.using( [ '
CAL.showProgress();
CAL.getTargetCat( pages, targetcat, mode );
createCatLinks: function ( symbol, list, table ) {
list.sort();
var button = ( this.settings.button && mw.loader.getState( '
for ( var c = 0; c < list.length; c++ ) {
var $tr = $( '<tr>' ),
defaults: [ {
name: 'watchlist',
'default': 'preferences'
}, {
name: 'minor',
'default': false
}, {
name: 'editpages',
'default': project !== 'commonswiki', // on Commons false
forcerestart: true
}, {
name: 'docleanup',
'default': false
}, {
name: 'subcatcount',
min: 5,
max: 500,
forcerestart: true
}, {
name: 'uncat',
'default':
}, {
name: 'button',
'default': true
} ]
/* eslint-enable camelcase */
|