User:Mikevoir/global.js

window.dev = window.dev || {}; 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',        //        //// Custom script without dependencies        'u:community:User:Mikevoir/SourceTemplateData.js',		// Load library        //'u:community:User:Mikevoir/lib.js',    ] });

// Load all custom scripts when library is in place //	var config = mw.config.get(['wgDiffNewId', 'wgAction', 'wgCanonicalSpecialPageName']); //	var libcheck = setInterval(function{ //		if (window.dev._LIB) { //			clearInterval(libcheck); //			importArticles({ //	   		type: 'script', //	   		articles: [ //	   			'u:community:User:Mikevoir/betterLinkSuggest.js', //	   			'u:community:User:Mikevoir/betterDiff.js', //	   			'u:community:User:Mikevoir/betterCodeMirror.js', //	   			// 'u:community:User:Mikevoir/sandbox.js', // Script for testing //	   		] //			}); //			//			// Load function when page is loaded //			$(function{ //				// Check we're in RC, a diff page or a history page //				if ( //					config.wgCanonicalSpecialPageName == 'Recentchanges' || //					config.wgDiffNewId || //					config.wgAction == 'history' //				) { //					// window._LIB.waitFor('.mw-thanks-thank-link', noThank); //				} //			}); //		} //	},100);

// 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;		}	}); }