User:Steinsplitter/common.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
switch ( mw.config.get( 'wgNamespaceNumber' ) ) {
case -1:
	if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Watchlist' ) {
		$( '.mw-changeslist li:has(a.mw-userlink[title="User:KolbertBot"])' ).hide();
		$( '.mw-changeslist li:has(a.mw-userlink[title="User:SchlurcherBot"])' ).hide();
		importScript( 'User:Steinsplitter/adminwatch.js' );
	}
	break;
case 6:
	importScript( 'User:Rillke/LicenseReview.js' );
	importScript( 'User:Magog the Ogre/cleanup.js' );
	importScript( 'User:Perhelion/JustReplace+.js' );
	break;
case 14:
	if ( mw.config.get( 'wgAction' ) === 'view' ) { importScript( 'User:Perhelion/massrename.js' ); }
	break;
case 3:
case 2:
	$.when( mw.loader.using( 'mediawiki.util' ), $.ready ).then( function () {
		mw.util.addPortletLink(
			'p-tb',
			'#',
			'ExtendedUserInfo',
			't-mworg2',
			'Load extended userinfo',
			'm',
			'#t-print' ).addEventListener( 'click', function () {
				mw.loader.load( '//meta.wikimedia.org/w/index.php?title=User:Perhelion/userstatus.js&action=raw&ctype=text/javascript' );
		} );
	} );
	if ( mw.config.get( 'wgTitle' ) === 'Steinsplitter/Test' ) {
		importScript( 'User:Steinsplitter/test.js' );
	}
}

window.delReqReason = 'as above. --';
// mw.loader.load( '//meta.wikimedia.org/w/index.php?title=User:Hoo_man/smart_rollback.js&action=raw&ctype=text/javascript' );
window.AjaxDeleteExtraButtons = [ {
	label: 'Copyvio (www)',
	tag: '{' + '{copyvio|1=[[COM:NETCOPYRIGHT|Copyright violation]], found elsewhere on the web and unlikely to be own work: [https://www.google.com/searchbyimage?image_url={{filepath:{' + '{subst:BASEPAGENAME}}}} google search]}}',
	img_summary: 'speedy deletion: possible copyvio',
	talk_tag: '{' + '{subst:copyvionote|1=%FILE%}}',
	talk_summary: 'Notification of possible copyright violation for %FILE%'
} ];