User:Mikevoir/global.js

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:AjaxBatchDelete.js',        'u:dev:MediaWiki:Bang.js',        'u:dev:MediaWiki:FileUsageAuto-update/code.js',        'u:dev:MediaWiki:LastEdited/code.js',        'u:dev:MediaWiki:MassRename/code.js',        'u:dev:MediaWiki:MassNullEdit/code.js',        'u:dev:MediaWiki:PurgeButton.js',        'u:dev:MediaWiki:Wikimarks/code.js',    ] });

// Load library importScriptPage('User:Mikevoir/lib.js', 'community'); // Load all custom scripts when library is in place var libcheck = setInterval(function{	if (window._LIB) {		clearInterval(libcheck);		importScriptPage('User:Mikevoir/betterLinkSuggest.js', 'community');		importScriptPage('User:Mikevoir/betterDiff.js', 'community');		importScriptPage('User:Mikevoir/betterCodeMirror.js', 'community');	} },100); var config = mw.config.get(['wgDiffNewId', 'wgAction', 'wgCanonicalSpecialPageName']);

// Load function upon page load $(function{	// Check we're in RC, a diff page or a history page	if ( config.wgCanonicalSpecialPageName == 'Recentchanges' || config.wgDiffNewId || config.wgAction == 'history' ) {		lib.waitFor('.mw-thanks-thank-link', noThank);	} });

// No thanks function noThank { document.querySelectorAll('.mw-thanks-thank-link').forEach(function(el) {		if (el.parentNode.nodeName === 'SPAN'){			el.parentNode.remove;		}else{			if ( el.previousSibling.data === '( ' && el.nextSibling.data === ' )' ) {				el.nextSibling.remove;				el.previousSibling.remove;			}			el.remove;		}	}); }