MediaWiki:Common.js: Unterschied zwischen den Versionen

KKeine Bearbeitungszusammenfassung
Umami: Eingeloggte Nutzer ausschließen
 
(6 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 159: Zeile 159:
/*
/*
* WikiEditor
* WikiEditor
mw.loader.load( 'https://wiki.wiidatabase.de/index.php?title=Benutzer:iCON/TemplateWizard.js&action=raw&ctype=text/javascript' );
*/
*/
mw.loader.load( 'ext.wikiEditor.toolbar' );
var customizeToolbar = function () {
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'advanced',
group: 'format',
tools: {
"hline": {
label: 'Horizontal line',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/a/a4/H-line_icon.png',
action: {
type: 'encapsulate',
options: {
pre: "----",
ownline: true
}
}
}
}
} );
};


/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */
/* Umami */
if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1 ) {
if (mw.config.get('wgUserName') === null) {
mw.loader.using( 'user.options' ).then( function () {
(function() {
// This can be the string "0" if the user disabled the preference ([[phab:T54542#555387]])
    var script = document.createElement('script');
if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {
    script.defer = true;
$.when(
    script.src = 'https://stats.wiidatabase.de/script.js';
mw.loader.using( 'ext.wikiEditor' ), $.ready
    script.dataset.websiteId = '8c6112d4-c906-4c53-8a18-8a3b57948cf2';
).then( customizeToolbar );
    document.head.appendChild(script);
}
})();
} );
}
}