//<nowiki>
//catALot///////////////////////////////////////
////////// Cat-a-lot user preferences //////////
window.catALotPrefs = {"disambig_category":"Disambiguation","redir_category":"Category redirects","watchlist":"preferences","minor":true,"editpages":true,"docleanup":true,"subcatcount":50,"uncat":true,"button":true};
////////////////////////////////////catALotEnd//
//</nowiki>
importScript('User:Magnus Manske/sdc_tool.js');
window.HotCatAutoRemoveCheckCat = true;
var customizeToolbar = function () {
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'main',
'groups': {
'mine': {
'label': 'mine'
}
}
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'main',
group: 'mine',
tools: {
"LRW": {
label: 'LRW',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/3/34/11_7_3_(Swedish_road_sign).svg',
action: {
type: 'encapsulate',
options: {
pre: "{{subst"+":lrw|site=",
post: "}}",
ownline: true
}
}
},
"MOTD": {
label: 'MOTD',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/f/f9/Flèche_à_droite.svg',
action: {
type: 'encapsulate',
options: {
pre: "=={{Assessment}}==",
post: "{{Media of the day|year={{subst"+":CURRENTYEAR}}|month=0|day=}}",
ownline: true
}
}
}
}
} );
};
/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
mw.loader.using( 'user.options' ).then( function () {
// This can be the string "0" if the user disabled the preference ([[phab:T54542#555387]])
if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {
$.when(
mw.loader.using( 'ext.wikiEditor' ), $.ready
).then( customizeToolbar );
}
} );
}