User:Speravir/common.js

// var isActive = true; if (isActive) { // cf. m:User:Speravir/config-Fliegelflagel.js var usersignature = '— – ', // signature for Enwiki customizeSigButton = function { $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {		section: 'main',		group: 'insert',		tools: {			'customsigenwiki': { // Custom signature for enwiki				label: 'signature & date',				type: 'button',				icon: 'https://upload.wikimedia.org/wikipedia/commons/2/2d/Insert-signature2.svg',					// https://commons.wikimedia.org/wiki/File:Insert-signature2.svg				action: {					type: 'encapsulate',					options: {						pre: usersignature					}				}			}		}	}); // addToToolbar: customsigenwiki }; // var customizeSigButton

if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1 ) { mw.loader.using( 'user.options' ).then( function {		if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {			$.when( mw.loader.using( 'ext.wikiEditor' ), $.ready ).then( customizeSigButton );		}	} ); } // end of edit check }// if (isActive) //