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.
console.log("You've been on Wikipedia");


mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Nardog/IPAInput.js&action=raw&ctype=text/javascript');
console.log("loaded IPAInput")
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Ohconfucius/script/EngvarB.js&action=raw&ctype=text/javascript');
console.log("loaded EngvarB")
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Ohconfucius/script/MOSNUM dates.js&action=raw&ctype=text/javascript');
console.log("loaded tool for telling people the proper way to format dates (spoiler alert: mdy)");
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:A_diehard_editor/en-PH-tagger.js&action=raw&ctype=text/javascript');
console.log('Philippine English tagger loaded (EXPERIMENTAL!)');

mw.util.addPortletLink('p-tb',mw.util.getUrl('Wikipedia:Teahouse'), 'Teahouse', 'pt-myvector', 'The Teahouse. Drink tea and ask questions from Wikipedia newcomers');
mw.util.addPortletLink( 'p-tb', mw.util.getUrl( 'Special:Export' ), 'Export pages', 'pt-myvector', 'Export pages to use for your own special nefarious purposes');
mw.util.addPortletLink( 'p-tb', mw.util.getUrl( 'Special:MyPage/common.js' ), 'My JavaScript', 'pt-myvector', 'Visit your JS file');
mw.util.addPortletLink( 'p-tb', mw.util.getUrl( 'Special:MyPage/common.css' ), 'My CSS', 'pt-myvector', 'Visit your CSS file');
console.log("loaded custom portlet links")

/* Automate purge confirmation dialog */
if (mw.config.get('wgAction') === 'purge') {
    $('form[action*="action=purge"]').submit();
}

window.LocalComments = {
    dateDifference: false,
    dateFormat: 'ymd',
    dayOfWeek: false,
    dropDays: 0,
    dropMonths: 0,
    timeFirst: false,
    twentyFourHours: true,
};

HotCat.messages.cat_removed = 'remove [[:Category:$1]]';
HotCat.messages.template_removed = 'remove {{[[:Category:$1]]}}';
HotCat.messages.cat_added = 'add [[:Category:$1]]';

/*
function getElementByXpath(path) {
  return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}

var contributeList = getElementByXpath("/html/body/div[1]/div/div[1]/div/nav/div[3]/div[2]/ul");
contributeList.innerHTML += "<li id=\"n-teahouse\" class=\"mw-list-item\"><a href=\"/wiki/Wikipedia:Teahouse\"><span>Teahouse</span></a></li>";
*/