User:Mario&LuigiBowser'sInsideStory/global.js

(function($) { function render(input) {    return $("").text("AJAX Undo").attr("href", "#").click(function { var target = $(this); var unmd = /&undo=([^&]*)/.exec(input)[1]; var requestUrl; var gurl = wgServer + wgScriptPath + "/api.php?action=query&prop=info|revisions&intoken=edit&titles=" + encodeURIComponent(wgPageName) + "&format=json"; var d = $("#mw-diff-ntitle2 .mw-userlink").html || (target.closest("li").find(".mw-userlink").html || "nil"); var encodedValue = prompt("Undo summary", "Undo revision " + unmd + " by " + d + " (talk)"); if (null !== encodedValue) { if (!encodedValue) { encodedValue = "Undo revision " + unmd + " by " + d + " (talk)"; }       target.html(' '); $.getJSON(gurl, function(d) {         requestUrl = d.query.pages[wgArticleId].edittoken;          $.ajax({ url : wgScriptPath + "/api.php?", data : "action=edit&format=json&title=" + encodeURIComponent(wgPageName) + "&undo=" + encodeURIComponent(unmd) + "&bot=1&summary=" + encodeURIComponent(encodedValue) + "&token=" + encodeURIComponent(requestUrl), dataType : "json", type : "POST", success : function(data) { if (data.edit && "Success" === data.edit.result) { target.text("(undone)"); } else { if (data.error && "undofailure" === data.error.code) { target.text("(error)"); alert(data.error.info); } else { target.text("(error)"); alert("Error: Unknown result from API."); }             }            },            error : function { target.text("(error)"); }         });        });      }    });  }  $(window).click(function(event) { var $link = $(event.target); if ($.find.matchesSelector($link[0], '#quickdiff-modal a[data-action="undo"]')) { event.preventDefault; var match = $link.attr("href"); event = /&undo=([^&]*)/.exec(match)[1]; match = /\/wiki\/([^?]*)/.exec(match)[1]; var unmd = mw.user.tokens.get("editToken"); var nil = $("#quickdiff-modal .diff-ntitle .mw-userlink").html || "nil"; var encodedValue = prompt("Undo summary", "Undo revision " + event + " by " + nil + " (talk)"); if (null !== encodedValue) { if (!encodedValue) { encodedValue = "Undo revision " + nil + " by " + nil + " (talk)"; }       $link.html(' '); $.ajax({         url : wgScriptPath + "/api.php?",          data : "action=edit&format=json&title=" + encodeURIComponent(match) + "&undo=" + encodeURIComponent(event) + "&bot=1&summary=" + encodeURIComponent(encodedValue) + "&token=" + encodeURIComponent(unmd),          dataType : "json",          type : "POST",          success : function(data) {            if (data.edit && "Success" === data.edit.result) {              $link.text("(undone)");            } else {              if (data.error && "undofailure" === data.error.code) {                $link.text("(error)");                alert(data.error.info);              } else {                $link.text("(error)");                alert("Error: Unknown result from API.");              }            }          },          error : function {            $link.text("(error)");          }        }); }   }  });  if ($(".mw-history-undo > a").length && "history" === wgAction) {    $(".mw-history-undo > a").each(function { var result = $(this).attr("href"); result = render(result); $(this).replaceWith(result); }); } else {    if ($("table.diff").length && "undefined" !== typeof $.getUrlVar("diff")) {      var target = $("table.diff").find(".diff-ntitle > #mw-diff-ntitle1 a:last");      var result = target.attr("href");      result = render(result);      target.replaceWith(result);    }  } })(window.jQuery); /////////////////////////////////////////////////////////////////////////////// /* -- -- */ /////////////////////////////////////////////////////////////////////////////// function RCRevert { mw.loader.using("mediawiki.api", function {   var self = {      init : function {        if (!$(".mw-rollback-link").length) {          if ("history" === mw.config.get("wgAction") && 1 < $("#pagehistory li").length) {            $("#pagehistory li:first .mw-history-undo a").before(' rollback | ');          } else {            if ("Contributions" === mw.config.get("wgCanonicalSpecialPageName")) {              $("#mw-content-text ul").find("li").each(function { if ($(this).find(".mw-uctop").length) { $(this).append(' [rollback] '); }             });            } else {              if ($.getUrlVar("diff") || $.getUrlVar("oldid")) {                if (0 === $("#differences-nextlink").length) {                  $(".mw-usertoollinks:last").after('    [rollback] ');                }              }            }          }          $(".mw-custom-rollback-link a").click(function { self.getRevisionIdAndContent($(this).attr("data-id")); $(this).parent.remove; });       }      },      getRevisionIdAndContent : function(term) {        var cb = new mw.Api;        cb.get({ action : "query", prop : "revisions", titles : term, rvprop : "user|ids", rvlimit : 500, cb : (new Date).getTime }).done(function(body) { if (body.error) { (new BannerNotification("Unable to rollback (failed to get revisions): " + body.error.code, "error")).show; } else { var sks; var id; for (id in body.query.pages) { sks = body.query.pages[id].revisions; }           var b = sks[0].user; var node; var revids; for (id in sks) { if (sks[id].user !== b) { node = sks[id].user; revids = sks[id].revid; break; }           }            if (node) { cb.get({               action : "query",                prop : "revisions",                rvprop : "content",                revids : revids,                cb : (new Date).getTime              }).done(function(body) {                if (body.error) {                  (new BannerNotification("Unable to rollback (failed to get page content): " + body.error.code, "error")).show;                } else {                  var later = "";                  var page;                  for (page in body.query.pages) {                    if (body.query.pages[page].revisions) {                      later = body.query.pages[page].revisions[0]["*"];                    }                  }                  self.performRollback(term, later, b, node);                }              }).fail(function {                (new BannerNotification("Unable to rollback: failed to get page content!", "error")).show; });           } else {              (new BannerNotification("Unable to rollback: no different editor found!", "error")).show;            }          }        }).fail(function {          (new BannerNotification("Unable to rollback: failed to get revisions!", "error")).show;        }); },     performRollback : function(value, key, v12, dataAndEvents) { (new mw.Api).post({         action : "edit",          title : value,          text : key,          summary : " ",          token : mw.user.tokens.values.editToken        }).done(function(replay) {          if (replay.error) {            (new BannerNotification("Unable to rollback (failed to publish edit): " + replay.error.code, "error")).show;          } else {            (new BannerNotification("Rollback successful!", "confirm")).show;          }        }).fail(function {          (new BannerNotification("Unable to rollback: failed to publish edit!", "error")).show;        }); }   };    self.init; }); } function ContribRC { var collection = $(" ");  var num = location.href.replace(/#[\S]*/, "");  collection.load(num + " #mw-content-text", function { var transMatch = collection.children("#mw-content-text"); if (transMatch.length) { $("#mw-content-text").replaceWith(transMatch); mw.util.$content = transMatch; } });  collection.remove; } var username = mw.config.get("wgUserName"); var page = mw.config.get("wgPageName"); $(".UserProfileMasthead .masthead-avatar .avatar").click(function { $("#contentSub").append('Wham | '); $("#contentSub").append(' Start RC | '); $("#contentSub").append(' Stop RC '); }); function whamhere { if (true === confirm("Wham?")) {    $("span.mw-custom-rollback-link a").each(function { var url = $(this).attr("href"); $.get(url); $(".mw-custom-rollback-link a").click; }); } else {    alert("Canceled!");  } } /////////////////////////////////////////////////////////////////////////////// /* -- -- */ /////////////////////////////////////////////////////////////////////////////// (function($, self) { function init(x, type) { (new self.Api).post({     format : "json",      action : "delete",      title : x,      reason : type,      bot : true,      token : oauth_token    }).done(function(replay) {      if (!replay.error) {        console.log("Deletion of " + x + " successful!");      } else {        console.log("Failed to delete " + x + ": " + replay.error.code);      }    }).fail(function {      console.log("Failed to delete " + x + "!");    }); } function postLink { $(".btn-mfd-start").remove; var html_binded = ' '; var grape = '        Delete Selected          Check All</a>'; $("#mw-content-text").find("ol").before(grape); $("#mw-content-text").find("ol li > a").each(function {     if (!$(this).parent.find("input").length) {        $(this).parent.prepend(html_binded);      }    }); $("#mw-content-text").find(".mw-allpages-table-chunk").before(grape); $("#mw-content-text").find(".mw-allpages-table-chunk td a").each(function {     if (!$(this).parent.find("input").length) {        $(this).parent.prepend(html_binded);      }    }); $("#mw-content-text").find("#mw-prefixindex-list-table").before(grape); $("#mw-content-text").find("#mw-prefixindex-list-table td a").each(function {     if (!$(this).parent.find("input").length) {        $(this).parent.prepend(html_binded);      }    }); $("#mw-content-text").find("ul").before(grape); $("#mw-content-text").find("ul li .gallerytext > a").each(function {     if (!$(this).parent.find("input").length) {        $(this).parent.prepend(html_binded);      }    }); $("#btn-ftd-del").click(function {     if ($(".selectiveDel:checked").length < 1) {        return alert("No files selected.");      }      var url = prompt("Please enter the delete reason", "Housekeeping");      if (!url) {        return;      }      $(".selectiveDel").each(function { var inputsPlugin = $(this); var id = $(this).parent.find("a").first.attr("title"); if (inputsPlugin.attr("Checked")) { init(id, url); $(this).parent.css({           "color" : "grey",            "text-decoration" : "line-through"          }).children.removeAttr("href").css({            "color" : "grey",            "text-decoration" : "line-through"          }); }     });      setTimeout(function { location.reload; }, 5E3);   }); $("#btn-ftd-check").click(function {     var script = $(this);      if (script.text === "Uncheck All") {        $(".selectiveDel").each(function { var $element = $(this); if ($element.attr("checked")) { $element.removeAttr("checked"); }       });        script.text("Check All");      } else {        $(".selectiveDel").each(function { var $this = $(this); if (!$this.attr("checked")) { $this.attr("checked", "checked"); }       });        script.text("Uncheck All");      }    }); } var mod = self.config.get("wgUserGroups"); var i = self.config.get("wgCanonicalSpecialPageName"); var oauth_token = self.user.tokens.get("editToken"); var reserved = ["Listredirects", "BrokenRedirects", "Unusedcategories", "Unusedtemplates", "Allpages", "Prefixindex", "Unusedimages", "UnusedVideos"]; if (reserved.indexOf(i) < 0 || mod.indexOf("sysop") + mod.indexOf("content-moderator") + mod.indexOf("patroller") + mod.indexOf("vstf") + mod.indexOf("staff") + mod.indexOf("helper") === -6) { return; } if (typeof window.mfdExclude !== "undefined") { if (window.mfdExclude === i) { return; }   if (Array.isArray(window.mfdExclude) && window.mfdExclude.indexOf(i) >= 0) { return; } }  if ($("#btn-mfd-del").length && $("#btn-mfd-check").length) { return; } if ($(".btn-mfd-start").length) { $(".btn-mfd-start").remove; } var htmlString = '      Selective Delete</a>'; $("#mw-content-text .mw-spcontent .emptymwmsg.mediawiki_showingresults").nextAll("p").append(htmlString); $('#mw-content-text .mw-allpages-table-form input[type="submit"]').after(htmlString); if ($("#mw-content-text").find("#mw-prefixindex-list-table").length > 0) { $('#mw-content-text #nsselect input[type="submit"]').after(htmlString); } $(".btn-mfd-start").click(function {    postLink;  }); })(this.jQuery, this.mediaWiki); /////////////////////////////////////////////////////////////////////////////// /* -- -- */ /////////////////////////////////////////////////////////////////////////////// mw.loader.using("mediawiki.api", function { var self = { init : function { if (!$(".mw-rollback-link").length) { if ("history" === mw.config.get("wgAction") && 1 < $("#pagehistory li").length) { $("#pagehistory li:first .mw-history-undo a").before(' rollback</a> | '); } else { if ("Contributions" === mw.config.get("wgCanonicalSpecialPageName")) { $("#mw-content-text ul").find("li").each(function {             if ($(this).find(".mw-uctop").length) {                $(this).append(' [rollback</a>] ');              }            }); } else { if ($.getUrlVar("diff") || $.getUrlVar("oldid")) { if (0 === $("#differences-nextlink").length) { $(".mw-usertoollinks:last").after('   [rollback</a>] '); }           }          }        }        $(".mw-custom-rollback-link a").click(function {          self.getRevisionIdAndContent($(this).attr("data-id"));          $(this).parent.remove;        }); }   },    getRevisionIdAndContent : function(term) { var cb = new mw.Api; cb.get({       action : "query",        prop : "revisions",        titles : term,        rvprop : "user|ids",        rvlimit : 500,        cb : (new Date).getTime      }).done(function(body) {        if (body.error) {          (new BannerNotification("Unable to rollback (failed to get revisions): " + body.error.code, "error")).show;        } else {          var sks;          var id;          for (id in body.query.pages) {            sks = body.query.pages[id].revisions;          }          var b = sks[0].user;          var node;          var revids;          for (id in sks) {            if (sks[id].user !== b) {              node = sks[id].user;              revids = sks[id].revid;              break;            }          }          if (node) {            cb.get({ action : "query", prop : "revisions", rvprop : "content", revids : revids, cb : (new Date).getTime }).done(function(body) { if (body.error) { (new BannerNotification("Unable to rollback (failed to get page content): " + body.error.code, "error")).show; } else { var later = ""; var page; for (page in body.query.pages) { if (body.query.pages[page].revisions) { later = body.query.pages[page].revisions[0]["*"]; }               }                self.performRollback(term, later, b, node); }           }).fail(function { (new BannerNotification("Unable to rollback: failed to get page content!", "error")).show; });         } else {            (new BannerNotification("Unable to rollback: no different editor found!", "error")).show;          }        }      }).fail(function {        (new BannerNotification("Unable to rollback: failed to get revisions!", "error")).show;      }); },   performRollback : function(value, key, v12, dataAndEvents) { (new mw.Api).post({       action : "edit",        title : value,        text : key,        summary : " ",        token : mw.user.tokens.values.editToken      }).done(function(replay) {        if (replay.error) {          (new BannerNotification("Unable to rollback (failed to publish edit): " + replay.error.code, "error")).show;        } else {          (new BannerNotification("Rollback successful!", "confirm")).show;        }      }).fail(function {        (new BannerNotification("Unable to rollback: failed to publish edit!", "error")).show;      }); } };  self.init; }); /////////////////////////////////////////////////////////////////////////////// /**/ ///————————————————————— Minor Direct JavaScript code ———————————————————————/// /**/ /////////////////////////////////////////////////////////////////////////////// // Add a history button on diff pages if ($('strong:contains("Changes:")').length) { $("#WikiaPageHeader").find("p").children("a").after(' (history)</a>'); } // Add clear reason button on delete page if (mw.config.get("wgAction") === "delete") {  $("#wpReason").after(' ⌫ ');  $("#wpClearReason").click(function { $("#wpReason").val("").focus; }); } // Add edit links on Special:WhatLinksHere if (mw.config.get("wgCanonicalSpecialPageName") === "Whatlinkshere") { $("#mw-whatlinkshere-list > li").each(function(dataAndEvents, context) { var fontSize = $(context).children("a").attr("href") + "?action=edit"; $(context).find(".mw-whatlinkshere-tools > a:last-child").after(" | ", $("</a>").attr("href", fontSize).text("edit")); }); } // Add separate list of uncreated categories on Special:Categories if (mw.config.get("wgCanonicalSpecialPageName") === "Categories") { var $newCats = $("  ").css("float", "right").text("Uncreated categories:");  var $newCatsList = $("<ul></ul>").appendTo($newCats);  $(".mw-spcontent > ul").before($newCats);  $(".mw-spcontent > ul > li").has(".newcategory").clone.appendTo($newCatsList); } // Disable 5 sec. edit save delay GlobalTriggers.bind("WikiaEditorReady", function(point) { if (point.controls) { point.controls.editform.off("submit").on("submit", function {     point.setState(3);    }); } }); // Display user's registration date in masthead $(function { mw.loader.using("mediawiki.api").then(function {   function displayWindowSize {      $(".globaledit-label").html($(".globaledit-label").html + " " + textStatus);    }    var textStatus;    var load;    (new mw.Api).get({ action : "query", list : "users", ususers : $("#UserProfileMasthead h1").text, usprop : "registration" }).done(function(client) { if (client.query.users) { textStatus = (new Date(client.query.users[0].registration)).toLocaleString; if (load) { displayWindowSize; }     }    });    var poll = setInterval(function { if ($(".globaledit-label").length > 0) { clearInterval(poll); load = true; if (textStatus) { displayWindowSize; }     }    }, 100);  }); }); // Global navbar modifications window.globalLinks = {  global: {    "User"        : "Special:Mypage",    "Talk"        : "Special:Mytalk",    "Contribs"    : "Special:MyContributions",    "Admins"      : "Special:ListAdmins",    "Activity"    : "Special:RecentChanges?hidepatrolled=0&hidebots=0",    "Maintenance" : "Special:Maintenance",    "Torus"       : "Special:Torus",    "Purge"       : "%page%?action=purge",    "Raw"         : "%page%?action=raw",    "Help"        : "Help:Index",    "Contact"     : "Special:Contact"  },  community: {    "JS"          : "Special:Mypage/global.js",    "CSS"         : "Special:Mypage/global.css"  } }; /////////////////////////////////////////////////////////////////////////////// /// // ——————————————————— End Direct Import JavaScript Code ———————————————————— / /// /////////////////////////////////////////////////////////////////////////////// //———————————————————————————————————————————————————————————————————————————— // Script Configurations /* All of the confgurations below contribute to how the JavaScript imports function. It only works with imports like this, not direct JavaScript code, hence why it is in between here and the mentioned section above. */ //———————————————————————————————————————————————————————————————————————————— /////////////////////////////////////////////////////////////////////////////// // AjaxRC: Used to Make imputted pages refresh in Ajax. window.ajaxRefresh           = 1E3; window.AjaxRCRefreshText     = 'Auto-refresh'; window.AjaxRCRefreshHoverText = 'Automatically refresh the page'; window.ajaxPages = [ /// // ——————————————————— Temporary Watchlist (for vandals) ———————————————————— / /// //Add below when necessary. /*———————————————————————————————————————————————————————————————————————————————— ———————————————————————————————————————————————————————————————————————————————— /* ////* English (en) *//// "Special:WikiActivity", "Special:RecentChanges", "Special:Watchlist", "Special:AbuseLog", "Special:Log", "Special:Log/upload", "Special:Images", "Special:Videos", "Special:Newwikis", "Report:Vandalism", "Report:Spam", "Report:User profile headers", "Report:Users and IPs needing checked", ////* German (Deutsch) (de) *//// "Spezial:WikiActivity", "Spezial:Letzte_Änderungen", "Spezial:Logbuch", ////* Spanish (Español) (es) *//// "Especial:WikiActivity", "Especial:CambiosRecientes", "Especial:Registro", ////* Suomi (Finnish) (fi) *//// "Toiminnot:WikiActivity", "Toiminnot:Tuoreet_muutokset", "Toiminnot:Loki", ////* French (Français) (fr) *//// "Spécial:WikiActivity", "Spécial:Modifications_récentes", "Spécial:Journal", ////* Italian (Italiano) (it) *//// "Speciale:WikiActivity", "Speciale:UltimeModifiche", "Speciale:Registri", ////* Japanese (日本語) (ja) *//// "特別:WikiActivity", "特別:最近の更新", "特別:ログ", ////* Korean (한국어) (ko) *//// "특수기능:위키활동내역", "특수기능:최근바뀜", "특수기능:기록", ////* Nederlands (nl) *//// "Speciaal:WikiActivity", "Speciaal:RecenteWijzigingen", "Speciaal:Logboeken", ////* Polish (Polski) (pl) *//// "Specjalna:Aktywność_na_wiki", "Specjalna:Ostatnie_zmiany", "Specjalna:Rejestr", ////* Brazilian Portuguese (Português do Brasil) (pt-br) *//// "Especial:Mudanças_recentes", ////* Russian (Русский) (ru) *//// "Служебная:WikiActivity", "Служебная:RecentChanges", "Служебная:Log", ////* Vietnamese (Tiếng Việt) (vi) *//// "Đặc_biệt:Hoạt_động_wiki", "Đặc_biệt:Thay_đổi_gần_đây", "Đặc_biệt:Nhật_trình", ////* Chinese (中文) (zh) *//// "Special:最近更改", "Special:日志", ////* Chinese (Taiwan) ( 中文(台灣) ) (zh-tw) *//// "特殊:WikiActivity", "特殊:近期變動", "特殊:日誌", ////* Afrikaans (af) *//// "Spesiaal:WikiActivity", "Spesiaal:Onlangse_wysigings", "Spesiaal:Logboek", ////* Arabic (العرب) (ar) *//// "خاص:WikiActivity", "خاص:أحدث_التغييرات", "خاص:سجل", ////* Belorussian (Беларуская) (be) *//// "Адмысловае:WikiActivity", "Адмысловае:RecentChanges", "Адмысловае:Log", ////* Bulgarian (Български) (bg) *//// "Специални:WikiActivity", "Специални:Последни_промени", "Специални:Дневници", ////* Catalan (Català) (ca) *//// "Especial:Canvis_recents", "Especial:Registre", ////* Greek (Ελληνικά) (el) *//// "Ειδικό:WikiActivity", "Ειδικό:ΠρόσφατεςΑλλαγές", "Ειδικό:Μητρώο", ////* Estonia (Eesti) (et) *//// "Eri:WikiActivity", "Eri:Viimased_muudatused", "Eri:Logid", ////* Farsi (فارسی) (fa) *//// "ویژه:WikiActivity", "ویژه:تغییرات_اخیر", "ویژه:سیاهه‌ها", ////* Galician (Galego) (gl) *//// "Especial:Cambios_recentes", "Especial:Rexistros", ////* Hungarian (Magyar) (hu) *//// "Speciális:WikiActivity", "Speciális:Friss_változtatások", "Speciális:Rendszernaplók", ////* Indonesian (Bahasa Indonesia) (id) *//// "Istimewa:WikiActivity", "Istimewa:Perubahan_terbaru", "Istimewa:Catatan", ////* Limburg (Limburgs in Dutch) (li) *//// /* Note: Wikiactivity is the same as the Nederlands' WikiActivity page, so it is not included. */ "Speciaal:Lètste_verangeringe", "Speciaal:Logbeuk", ////* Lithuanian (Lietuvių) (lt) *//// "Specialus:WikiActivity", "Specialus:Naujausi_keitimai", "Specialus:Sąrašas", ////* Norwegian Bokmål ( ‪Norsk (bokmål) ‬) (no) *//// "Spesial:WikiActivity", "Spesial:Siste_endringer", "Spesial:Logg", ////* Occitan (oc) *//// "Especial:Darrièrs_cambiaments", "Especial:Jornal", ////* Romanian (Română) (ro) *//// "Special:Schimbări_recente", "Special:Jurnal", ////* Serbian / serbian (Српски / Srpski) (sr) *//// "Посебно:WikiActivity", "Посебно:СкорашњеИзмене", "Посебно:Извештај", ////* Ukrainian (Українська) (uk) *//// "Спеціальна:WikiActivity", "Спеціальна:RecentChanges", "Спеціальна:Log" //// // —————————————————————————— End AjaxRC Section ———————————————————————————— // //// ]; // AjaxDelete Configuration window.AjaxDelete = { deleteReasons: { "w:Help:Vandalism"      : "Vandalism", "w:Help:Spam"           : "Spam", "Marked for speedy deletion" : "Speedy", "Empty page"                : "Empty", "Author's request"          : "Author request", "Irrelevant to " : "Irrelevant" }, imageDeleteReasons: { "Offensive"                 : "Offensive", "inappropriate"             : "inappropriate", "Harassment"                : "Harassment", "Housekeeping/Unused"       : "Unused", "Copyright infringement"    : "Copyright", "Author's request"          : "Author request" }, autoCheckWatch: false, noUndelete: true }; // AutoFormatter Configuration var autoFormatWikimediaLinks   = true;  // Format localized hyperlink syntax var autoFormatLocalisation     = true;  // Format deprecated keywords and syntaxes var autoFormatMaskedLinks      = false; // Format masked hyperlinked text var autoFormatShortYearRanges  = true;  // Format year ranges // CacheCheck Configuration /* Add between the brackets the pages this script does not activate on. */ window.cacheSkip = []; /* The number of links it will check and cross out before going no futher. */ window.cacheSkipLimit = 1E3; /* I'm not entirely sure what this does, so I left it blank. */ window.topLevelCat = ""; // Fast Delete Configuration var fdButtons = [];          /*  Delete Summaries --- */ /* Button Labels */ fdButtons[fdButtons.length] = {"summary" : "spam",          "label" : "S"     }; fdButtons[fdButtons.length] = {"summary" : "Broken file",                   "label" : "B"     }; fdButtons[fdButtons.length] = {"summary" : "Duplicate",                     "label" : "D"     }; fdButtons[fdButtons.length] = {"summary" : "Housekeeping",                  "label" : "HK"    }; fdButtons[fdButtons.length] = {"summary" : "Cleanup",                       "label" : "C"     }; fdButtons[fdButtons.length] = {"summary" : "Unused",                        "label" : "U"     }; fdButtons[fdButtons.length] = {"summary" : "Unofficial/Irrelevant",         "label" : "UI"    }; fdButtons[fdButtons.length] = {"summary" : "ToU", "label" : "ToU"   }; // Pseudo-Vector JS window.pseudoVector = { loadCss            : true, addReadTab         : true, addContributionsTab : true, disableWatchIcon   : false, visualEditorIcons  : false }; // RailWAM Configuration window.railWAM = { // This creates the WAM Log page under my user namespace. logPage:"User:Cheeseskates/WAM Log" }; // WHAM Configuration /* WHAM bots me by default */ WHAMBotMe = true; /* Default reason */ WHAMBotReason = "Official Cleanup Business"; /* Ticks equaling 0.1 seconds. 1,000 ticks = 1 second */ WHAMDelay = 100; /////////////////////////////////////////////////////////////////////////////// /// // ——————————————————————— End Configuration Section ———————————————————————— // /// /////////////////////////////////////////////////////////////////////////////// //———————————————————————————————————————————————————————————————————————————— // Imports /* Imports minify the rest of the JavaScript or CSS code and combines multiple HTTP requests into a single data transfer, making it save space and load faster than direct code. It is recommended to import this way. */ //———————————————————————————————————————————————————————————————————————————— /////////////////////////////////////////////////////////////////////////////// //--- /* importscriptURL */ //--- // Advisor - Helps with editing suggestions such as whitespace removal, headings nest, etc. importScriptURI("https://en.wikipedia.org/w/index.php?title=User:Cameltrader/Advisor.js&action=raw&ctype=text/javascript"); // AutoFormatter - Formats a page automatically to fix common mistakes in wiki-markup importScriptURI("https://de.wikipedia.org/w/index.php?title=Benutzer:TMg/autoFormatter.js&action=raw&ctype=text/javascript"); // AutoLink - Parses wikilinks, [external links], {templates}, and URLs into clickable links importScriptURI("https://en.wikipedia.org/w/index.php?title=User:Lenore/autolink.js&action=raw&ctype=text/javascript"); //--- /* importArticles */ //--- $(function { importArticles({ type: "script", articles: [ "u:dev:MediaWiki:AjaxBatchUndelete.js",                         // w:c:dev:AjaxBatchUndelete "u:dev:MediaWiki:AjaxDelete/code.js",                           // w:c:dev:AjaxDelete "u:dev:MediaWiki:AjaxPatrol/code.js",                           // w:c:dev:AjaxPatrol "u:dev:MediaWiki:AjaxRC/code.js",                               // w:c:dev:AjaxRC "u:dev:MediaWiki:AntiUnicruft/code.js",                         // w:c:dev:AntiUnicruft "u:dev:MediaWiki:ArchiveTool/code.js",                          // w:c:dev:ArchiveTool "u:dev:MediaWiki:CacheCheck/code.js",                           // w:c:dev:CacheCheck "u:dev:MediaWiki:CatFilter/code.js",                            // w:c:dev:CatFilter "u:dev:MediaWiki:CategoryRenameAuto-update/code.js",            // w:c:dev:CategoryRenameAuto-update "u:dev:MediaWiki:ContribsLink/code.js",                         // w:c:dev:ContribsLink "u:dev:MediaWiki:DiscussionsFeed.js",                           // w:c:dev:DiscussionsFeed "u:dev:MediaWiki:DisplayTimer/code.js",                         // w:c:dev:DisplayTimer "u:dev:MediaWiki:DupImageList/code.js",                         // w:c:dev:DupImageList "u:dev:MediaWiki:EditIntroButton/code.js",                      // w:c:dev:EditIntroButton "u:dev:MediaWiki:ExtendedContributeButtonOptions/code.js",      // w:c:dev:ExtendedContributeButtonOptions "u:dev:MediaWiki:FastDelete/code.js",                           // w:c:dev:FastDelete "u:dev:MediaWiki:FastOldImageDelete/code.js",                   // w:c:dev:FastOldImageDelete "u:dev:MediaWiki:FileUsageAuto-update/code.js",                 // w:c:dev:FileUsageAuto-update "u:dev:MediaWiki:FindAndReplace/code.js",                       // w:c:dev:FindAndReplace "u:dev:MediaWiki:FloatingTableHeader/Code.js",                  // w:c:dev:FloatingTableHeader "u:dev:MediaWiki:FloatingToc/code.js",                          // w:c:dev:FloatingToc "u:dev:MediaWiki:GlobalEditcount/code.js",                      // w:c:dev:GlobalEditcount "u:dev:MediaWiki:HeaderLinks/code.js",                          // w:c:dev:HeaderLinks "u:dev:MediaWiki:LastEdited/code.js",                           // w:c:dev:LastEdited "u:dev:MediaWiki:LinkThumb.js",                                 // w:c:dev:LinkThumb "u:dev:MediaWiki:ListFiles/code.js",                            // w:c:dev:ListFiles "u:dev:MediaWiki:MarkBlocked.js",                               // w:c:dev:MarkBlocked "u:dev:MediaWiki:MarkForDeletion/code.js",                      // w:c:dev:MarkForDeletion "u:dev:MediaWiki:MassBlock/code.js",                            // w:c:dev:MassBlock "u:dev:MediaWiki:MassCategorization/code.js",                   // w:c:dev:MassCategorization "u:dev:MediaWiki:MassCreate/code.js",                           // w:c:dev:MassCreate "u:dev:MediaWiki:MassEdit/code.js",                             // w:c:dev:MassEdit "u:dev:MediaWiki:MassNullEdit/code.js",                         // w:c:dev:MassNullEdit "u:dev:MediaWiki:MassProtect/code.js",                          // w:c:dev:MassProtect "u:dev:MediaWiki:MassRename/code.js",                           // w:c:dev:MassRename "u:dev:MediaWiki:MassRenameRevert/code.js",                     // w:c:dev:MassRenameRevert "u:dev:MediaWiki:MassUserRights/code.js",                       // w:c:dev:MassUserRights "u:dev:MediaWiki:MessageBlock/code.js",                         // w:c:dev:MessageBlock "u:dev:MediaWiki:WallGreetingButton/code.js",                   // w:c:dev:WallGreetingButton "u:dev:MediaWiki:MisspelledPage/code.js",                       // w:c:dev:MisspelledPage "u:dev:MediaWiki:MultipleFileDelete/code.js",                   // w:c:dev:MultipleFileDelete "u:dev:MediaWiki:NewPagesUser.js",                              // w:c:dev:NewPagesUser "u:dev:MediaWiki:NullEditButton/code.js",                       // w:c:dev:NullEditButton "u:dev:MediaWiki:OldFilePages/code.js",                         // w:c:dev:OldFilePages "u:dev:MediaWiki:PageRenameAuto-update/code.js",                // w:c:dev:PageRenameAuto-update "u:dev:MediaWiki:PortableCSSPad/code.js",                       // w:c:dev:PortableCSSPad "u:dev:MediaWiki:ProtectedHighlight/code.js",                   // w:c:dev:ProtectedHighlight "u:dev:MediaWiki:Pseudo-Vector.js",                             // w:c:dev:Pseudo-Vector "u:dev:MediaWiki:QQX/code.js",                                  // w:c:dev:QQX "u:dev:MediaWiki:QRThis/code.js",                               // w:c:dev:QRThis "u:dev:MediaWiki:QuickDiff/code.js",                            // w:c:dev:QuickDiff "u:dev:MediaWiki:Quick Management/code.js",                     // w:c:dev:Quick Management "u:dev:MediaWiki:QuickThreads/code.js",                         // w:c:dev:QuickThreads "u:dev:MediaWiki:QuickToolsv2/code.js",                         // w:c:dev:QuickToolsv2 "u:dev:MediaWiki:RailWAM/code.js",                              // w:c:dev:RailWAM "u:dev:MediaWiki:ReaderMode/code.js",                           // w:c:dev:ReaderMode "u:dev:MediaWiki:RecentChangesMultiple/code.2.js",              // w:c:dev:RecentChangesMultiple "u:dev:MediaWiki:RevealAnonIP/code.js",                         // w:c:dev:RevealAnonIP "u:dev:MediaWiki:SearchSuggest/code.js",                        // w:c:dev:SearchSuggest "u:dev:MediaWiki:ThreadIndicator/code.js",                      // w:c:dev:ThreadIndicator "u:dev:MediaWiki:Thread Inspection/code.js",                    // w:c:dev:Thread Inspection "u:dev:MediaWiki:UnsafeScripts/code.js",                        // w:c:dev:UnsafeScripts "u:dev:MediaWiki:UserActivityTab/code.js",                      // w:c:dev:UserActivityTab "u:dev:MediaWiki:UserInfo.js",                                  // w:c:dev:UserInfo "u:dev:MediaWiki:UsernameAvailability/code.js",                 // w:c:dev:UsernameAvailability "u:dev:MediaWiki:UserRightsRecord/code.js",                     // w:c:dev:UserRightsRecord "u:dev:MediaWiki:View Source/code.js",                          // w:c:dev:View Source "u:dev:MediaWiki:WikiStatistics/code.js",                       // w:c:dev:WikiStatistics "u:dev:MediaWiki:YouTubeModal/code.js",                         // w:c:dev:YouTubeModal "u:admintools:MediaWiki:Common.js/ajaxRollback.js",             // w:c:admintools:MediaWiki:Common.js/ajaxRollback.js "u:admintools:MediaWiki:Common.js/extraRollbacks.js",           // w:c:admintools:MediaWiki:Common.js/extraRollbacks.js "u:admintools:MediaWiki:Common.js/iprange.js",                  // w:c:admintools:MediaWiki:Common.js/iprange.js "u:admintools:MediaWiki:Common.js/Maintenance.js",              // w:c:admintools:MediaWiki:Common.js/Maintenance.js "u:community:User:Sannse/Imagelisttools.js",                    // w:c:community:User:Sannse/Imagelisttools.js "u:community:User:Sannse/forumtools.js",                        // w:c:community:User:Sannse/forumtools.js "u:josephhawk:User:Josephyr/categorycleanup.js",                // w:c:josephhawk:User:Josephyr/categorycleanup.js "u:josephhawk:User:Josephyr/filecleanup.js",                    // w:c:josephhawk:User:Josephyr/filecleanup.js "u:josephhawk:User:Josephyr/linksweeper.js",                    // w:c:josephhawk:User:Josephyr/linksweeper.js "u:josephhawk:User:Josephyr/redirects.js",                      // w:c:josephhawk:User:Josephyr/redirects.js "u:josephhawk:User:Josephyr/tc.js",                             // w:c:josephhawk:User:Josephyr/tc.js "u:kocka:MediaWiki:AjaxCommentDelete/code.js",                  // w:c:kocka:MediaWiki:AjaxCommentDelete/code.js "u:kocka:MediaWiki:AjaxThreadDelete/code.js",                   // w:c:kocka:MediaWiki:AjaxThreadDelete/code.js "u:kocka:MediaWiki:MessageWallActions/code.js",                 // w:c:kocka:MediaWiki:MessageWallActions/code.js "u:kocka:User:KockaAdmiralac/GlobalNavModifications.javascript", // w:c:kocka:User:KockaAdmiralac/GlobalNavModifications.javascript "u:kocka:User:KockaAdmiralac/LinkModifications.javascript",     // w:c:kocka:User:KockaAdmiralac/LinkModifications.javascript "u:kocka:User:KockaAdmiralac/MastheadGender.javascript",        // w:c:kocka:User:KockaAdmiralac/MastheadGender.javascript "u:kocka:User:KockaAdmiralac/PatrolAll.javascript",             // w:c:kocka:User:KockaAdmiralac/PatrolAll.javascript "u:kocka:User:KockaAdmiralac/TorusAutoFullscreen.javascript",   // w:c:kocka:User:KockaAdmiralac/TorusAutoFullscreen.javascript "u:kocka:User:KockaAdmiralac/UnhideUserWikis.javascript",       // w:c:kocka:User:KockaAdmiralac/UnhideUserWikis.javascript "u:monchbox:MediaWiki:Torus.js",                                // w:c:monchbox:MediaWiki:Torus.js "u:noreply:MediaWiki:FileUsage.js",                             // w:c:noreply:MediaWiki:FileUsage.js "u:ozank:MediaWiki:Chatconnect.js",                             // w:c:ozank:MediaWiki:Chatconnect.js "u:starmanw:MediaWiki:MultiUpload/code.js",                     // w:c:starmanw:MediaWiki:MultiUpload/code.js "u:starmanw:User:Dorumin/QuickLogs",                            // w:c:starmanw:User:Dorumin/QuickLogs "u:starmanw:User:Dorumin/WHAM",                                 // w:c:starmanw:User:Dorumin/WHAM "u:vstf:User:Sactage/EasyCURangeCalc.js"                        // w:c:vstf:User:Sactage/EasyCURangeCalc.js ] }); });
 * * Name:       Cross-wiki Rollback kit                                     |
 * * Author:     Ozank Cx; Modified by Ditto Creeper Bot                     |
 * * Description: Make the contributions page refresh like AjaxRC and have a |
 * WHAM button that works with the rollback script.           |
 * * Changes:    Thread:680 on botcentral                                    |
 * * Status:     Standardized                                                |
 * * Changes:    Thread:680 on botcentral                                    |
 * * Status:     Standardized                                                |
 * * Status:     Standardized                                                |
 * * Status:     Standardized                                                |
 * * Name:       MultipleFileDelete                                          |
 * * Author:     Spottra                                                     |
 * * Description: Enables selective-delete to maintenance pages.             |
 * * Changes:    Custom rights requirement                                   |
 * * Status:     Standardized                                                |
 * * Changes:    Custom rights requirement                                   |
 * * Status:     Standardized                                                |
 * * Status:     Standardized                                                |
 * * Status:     Standardized                                                |
 * * Name:       Rollback                                                    |
 * * Author:     Ozank Cx                                                    |
 * * Description: Grants the ability to Rollback edits without the right.    |
 * * Changes:    No edit summary.                                            |
 * * Status:     Standardized                                                |
 * * Changes:    No edit summary.                                            |
 * * Status:     Standardized                                                |
 * * Status:     Standardized                                                |
 * * Status:     Standardized                                                |
 * // Interlanguage Wiki Pages //                           |
 * Note 1: The order is according to the Language Brigade Wiki.                    |
 * Note 2: The first language name is the English word. The second language        |
 * name is the language's word/original word. The two letters after are the        |
 * abbreviations for the second language names.                                    |
 * 1. Always add the language names in this order: English word -> Original ↓      |
 * -> Abbreviation (e.g. fr for french)                                            |
 * 2. Always add the page names in this order: WikiActivity -> RecentChanges -> Log |
 * Note 3: The Chinese and Romanian's WikiActivity are the same as the English     |
 * WikiActivity page, and the Brazilian Portuguese (including their Log page),     |
 * Catalan, Galician, and occitan's WikiActivity are the same as the Spanish       |
 * WikiActivity page. Because of this, They are not added to prevent duplication.  |
 * WikiActivity page, and the Brazilian Portuguese (including their Log page),     |
 * Catalan, Galician, and occitan's WikiActivity are the same as the Spanish       |
 * WikiActivity page. Because of this, They are not added to prevent duplication.  |