User:Philoserf/common.js

mw.loader.load(["ext.gadget.metadata"]); $(function {  var wgUserName = mw.config.get("wgUserName");  var wgServer = mw.config.get("wgServer");  var wgScript = mw.config.get("wgScript");  if (typeof statusChangerConfig == "undefined") {    statusChangerConfig = {};  }

var setMessage = function (stat) { var message = stat; switch (message) { case "offline": message = "offline"; break; case "online": message = "online"; break; }   return message; };

if (typeof statusChangerConfig.statusList == "undefined") { statusChangerConfig.statusList = ["online", "offline"]; }

if (typeof statusChangerConfig.statusPage == "undefined") { statusChangerConfig.statusPage = "User:" + wgUserName + "/Status"; }

var msg; for (var i = 0; i < statusChangerConfig.statusList.length; i++) { var stat = statusChangerConfig.statusList[i]; msg = setMessage(stat); mw.util.addPortletLink(     "p-personal",      wgServer +        wgScript +        "?title=" +        statusChangerConfig.statusPage +        "&action=submit&newstatus=" +        stat,      stat,      "pt-status-" + stat,      "I'm " + msg + "!",      "",      document.getElementById("pt-logout")    ); }

if (location.href.indexOf("&action=submit&newstatus=") == -1) return; statusRegExp = /&action=submit&newstatus=(.*)/; var status = statusRegExp.exec(location.href)[1]; document.getElementById("wpTextbox1").value = status; msg = setMessage(status);

document.getElementById("wpSummary").value = wgUserName + " is now " + msg + "."; document.getElementById("wpMinoredit").checked = true; document.getElementById("editform").submit; });

importScript('User:Bellezzasolo/Scripts/subpages.js'); // Backlink: User:Bellezzasolo/Scripts/subpages.js importScript('User:BrandonXLF/CitationStyleMarker.js'); // Backlink: User:BrandonXLF/CitationStyleMarker.js importScript('User:BrandonXLF/GreenRedirects.js'); // Backlink: User:BrandonXLF/GreenRedirects.js importScript('User:BrandonXLF/ListSorter.js'); // Backlink: User:BrandonXLF/ListSorter.js importScript('User:Enterprisey/short-tab-titles.js'); // Backlink: User:Enterprisey/short-tab-titles.js importScript('User:Enterprisey/watchlist-notice.js'); // Backlink: User:Enterprisey/watchlist-notice.js importScript('User:EpochFail/ArticleQuality.js'); // Backlink: User:EpochFail/ArticleQuality.js importScript('User:Evad37/rater.js'); // Backlink: User:Evad37/rater.js importScript('User:Headbomb/unreliable.js'); // Backlink: User:Headbomb/unreliable.js importScript('User:Novem_Linguae/Scripts/CiteHighlighter.js'); // Backlink: User:Novem_Linguae/Scripts/CiteHighlighter.js importScript('User:Ohconfucius/dashes.js'); // Backlink: User:Ohconfucius/dashes.js importScript('User:Ohconfucius/script/Common Terms.js'); // Backlink: User:Ohconfucius/script/Common Terms.js importScript('User:Ohconfucius/script/formatgeneral.js'); // Backlink: User:Ohconfucius/script/formatgeneral.js importScript('User:Ohconfucius/script/MOSNUM dates.js'); // Backlink: User:Ohconfucius/script/MOSNUM dates.js importScript('User:Ohconfucius/script/Sources.js'); // Backlink: User:Ohconfucius/script/Sources.js importScript('User:SuperHamster/CiteUnseen.js'); // Backlink: User:SuperHamster/CiteUnseen.js importScript('user:Qwertyytrewqqwerty/DisamAssist.js'); // Backlink: user:Qwertyytrewqqwerty/DisamAssist.js importScript('User:Trappist the monk/HarvErrors.js'); // Backlink: User:Trappist the monk/HarvErrors.js importScript('User:BrandonXLF/ReferenceExpander.js'); // Backlink: User:BrandonXLF/ReferenceExpander.js importScript('User:Zhaofeng Li/Reflinks.js'); // Backlink: User:Zhaofeng Li/Reflinks.js importScript('User:DaxServer/BooksToSfn.js'); // Backlink: User:DaxServer/BooksToSfn.js importScript('User:Quarl/auto summary.js'); // Backlink: User:Quarl/auto summary.js importScript('User:Barticus88/WhatLinksHere.js'); // Backlink: User:Barticus88/WhatLinksHere.js importScript('User:BrandonXLF/FindSources.js'); // Backlink: User:BrandonXLF/FindSources.js importScript('User:Awesome Aasim/xfdvote.js'); // Backlink: User:Awesome Aasim/xfdvote.js importScript('User:Ahecht/Scripts/watchlistcleaner.js'); // Backlink: User:Ahecht/Scripts/watchlistcleaner.js importScript('User:Evad37/OneClickArchiver.js'); // Backlink: User:Evad37/OneClickArchiver.js