User:A diehard editor/common.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
The accompanying .css page for this skin is at User:A diehard editor/common.css. |
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>";
*/