Jump to content

User:Moonythedwarf/wikimap.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
var wikimap = {
	"Wikipedia": "https://en.wikipedia.org/wiki/Main_Page",
	"Wikidata": "https://wikidata.org/wiki/Wikidata:Main_Page",
	"Wikiversity": "https://en.wikiversity.org/wiki/Wikiversity:Main_Page",
	"Esolang": "https://esolangs.org/wiki/Main_Page",
};

$.when(mw.loader.using('mediawiki.util'), $.ready).then(function () { 
	for (var x in wikimap) {
		if (mw.config.get("wgSiteName") !== x) {
			mw.util.addPortletLink("p-navigation", wikimap[x], x);
		}
	}
});