MediaWiki:Chat.js

/* Interwiki & Custom Links! */ CustomLinks = typeof CustomLinks !== "undefined" ? CustomLinks : {}; if (CustomLinks.preventDefault === true) { // default disabled - remove preventDefault property and don't add default values delete CustomLinks.preventDefault; } else { // adding default values - not disabled CustomLinks.mw = "http://www.mediawiki.org"; CustomLinks.mediawikiwiki = "http://www.mediawiki.org"; CustomLinks.commons = "http://commons.wikimedia.org"; CustomLinks.wikimedia = "http://wikimediafoundation.org"; CustomLinks.wikipedia = "http://en.wikipedia.org"; } $("body").on("DOMNodeInserted", ".Chat ul > li:not(.inline-alert)", function(el) {	$(el.target).find("a").each(function { var link = $(this).attr("href").substr(("http://" + location.hostname + "/wiki/").length).replace(new RegExp("^(" + Object.keys(CustomLinks).join("|") + "):", "i"), function(m) {			var nonColon = m.substr(0, m.length - 1).toLowerCase;			return CustomLinks[nonColon] + "/wiki/";		}); $(this).attr("href", link); }); });

/* QuickModTools */ importArticles({	type: "script",	articles: [		"u:dev:QuickModTools/code.js"	] }); importArticles({	type: "script",	articles: [		"u:dev:QuickModTools/loader.js"	] });