User:Rob Kam/common.js

//enhanced diff - https://de.wikipedia.org/wiki/Benutzer_Diskussion:TMg/cleanDiff mw.loader.load('//de.wikipedia.org/w/index.php?title=Benutzer:TMg/cleanDiff.js&action=raw&ctype=text/javascript');

//format tidier - https://meta.wikimedia.org/wiki/User:TMg/autoFormatter mw.loader.load('//de.wikipedia.org/w/index.php?title=Benutzer:TMg/autoFormatter.js&action=raw&ctype=text/javascript'); var autoFormatMaskedLinks = false; var autoFormatWikimediaLinks = false; var autoFormatReplacements = [ ['S.D.I.Y.', 'SDIY'], ['', '\\w -->'], [/ +<ref\b/g, '<ref'], [	   /(\n[*#]+) *([^\s*#:;])/g, '$1 $2'	], ];

// https://en.wikipedia.org/wiki/User:Joeytje50/JWB Javascript Wiki Browser mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Joeytje50/JWB.js/load.js&action=raw&ctype=text/javascript');

/* Simple Electronics Wiki add custom buttons to the old style edit toolbar */ ( function ( mw, $ ) { 'use strict'; var addExtraButtons = function{	mw.toolbar.addButton( { imageFile: '//upload.wikimedia.org/wikipedia/commons/c/c8/Button_redirect.png', speedTip: 'Redirect', tagOpen: '#REDIRECT ',		tagClose: '', sampleText: 'Article Name', imageId: 'button-redirect' } );	mw.toolbar.addButton( { imageFile: '//upload.wikimedia.org/wikipedia/en/3/34/Button_hide_comment.png', speedTip: 'Comment', tagOpen: '', sampleText: 'Comment', imageId: 'button-comment' } );	mw.toolbar.addButton( { imageFile: '//upload.wikimedia.org/wikipedia/commons/7/79/Button_reflink.png', speedTip: 'References', tagOpen: ' ', tagClose: '<\/ref>', sampleText: 'Insert reference here', imageId: 'button-reference' } );	mw.toolbar.addButton({ imageFile: 'https://upload.wikimedia.org/wikipedia/commons/6/6a/Button_sup_letter.png', speedTip: 'Superscript', tagOpen: ' ', tagClose: ' ', sampleText: 'Insert text here', imageId: 'button-superscript' } );	mw.toolbar.addButton({ imageFile: 'https://upload.wikimedia.org/wikipedia/commons/a/aa/Button_sub_letter.png', speedTip: 'Subscript', tagOpen: ' ', tagClose: ' ', sampleText: 'Insert text here', imageId: 'button-subscript' } );	mw.toolbar.addButton({ imageFile: 'https://upload.wikimedia.org/wikipedia/commons/5/5b/Math_icon.png', speedTip: 'Math', tagOpen: '$$', tagClose: '$$', sampleText: 'Insert text here', imageId: 'button-math' } ); /* If you want more buttons, copy and adapt the examples above and paste the modified version before this comment */ }; if( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1 ) {	mw.loader.using( 'user.options', function { // This can be the string "0" if the user disabled the preference (52542) if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) { // Use something like m:User:Krinkle/Scripts/InsertWikiEditorButton } else if ( mw.user.options.get( 'showtoolbar' ) == 1 ) { $.when(				mw.loader.using( 'mediawiki.action.edit' ),				$.ready			).then( addExtraButtons ); }	} ); } }( mediaWiki, jQuery ) ); /***/