User:Eizen/global.js

window.SeeMoreActivityButtonLoaded = true; window.DiscordIntegratorLoaded = true; window.ajaxPages = [ "Special:WikiActivity", "Special:RecentChanges", ];

[ {    originalTracking: "explore-community", newTracking: "explore-upload", newUrl: "Special:Log/upload", text: "Upload Log" }, {    originalTracking: "explore-random", newTracking: "explore-changes", newUrl: "Special:RecentChanges", text: "Recent Changes" }, {    originalTracking: "explore-videos", newTracking: "explore-log", newUrl: "Special:Log", text: "Special Log" } ].forEach(function (paramItem) { if ( $("a[data-tracking='" + paramItem.originalTracking + "']").exists && !$("a[data-tracking='" + paramItem.newTracking + "']").exists ) {   $("a[data-tracking='" + paramItem.originalTracking + "']")      .attr("href", mw.util.getUrl(paramItem.newUrl))      .attr("data-tracking", paramItem.newTracking)      .text(paramItem.text);  } });

[ {    selector: "a[data-name='history']", element: "li" }, {    selector: ".tools-customize", element: "li" }, {    selector: ".global-shortcuts-help-entry-point", element: "li" }, {    selector: "#ca-ve-edit", element: "li" }, {    selector: ".wds-global-navigation__user-menu a:contains('Help')", element: "li" }, {    selector: ".discord-widget-container", element: "section" } ].forEach(function (paramItem) { var itemInterval, item;

itemInterval = setInterval(function {    item = paramItem.selector;

if ($(item).exists) { clearInterval(itemInterval); $(item).closest(paramItem.element).remove; } }, 200); });

GlobalTriggers.bind("WikiaEditorReady", function (paramEditor) { if (paramEditor.controls) {    paramEditor.controls.editform.off("submit").on("submit", function  { paramEditor.setState(3); }); } });

mw.hook("dev.massEdit").add(function (module) { $.each({ debug: "toggleDebug", testing: "toggleTesting", observe: "observeScript", }, function (alias, method) { this[alias] = module.exports[method]; }.bind(this)); }.bind(this));

if (window.ChatWidget && ChatWidget.onClickChatButton) { ChatWidget.onClickChatButton = function (paramChatLink) { var chatUrl, chatWindow;

chatUrl = paramChatLink && new mw.Uri(paramChatLink); chatWindow = window.open(chatUrl.toString, "wikiachat", "");

chatWindow.addEventListener("DOMContentLoaded", function {      chatWindow.importArticles({ type: "script", articles: [ "u:dev:ChatAwayButton/code.js", "u:dev:ChatMessageWallCount/code.js", "u:dev:NewMessageCount.js", "u:dev:PrivateMessageAlert/code.js", ]     });    }, false); }; }

importArticles({ type: "script",  articles: [    "u:dev:MediaWiki:AjaxRC/code.js",    "u:dev:MediaWiki:AjaxUndo/code.js",    "u:dev:MediaWiki:CodeQuickLinks/code.js",    "u:dev:MediaWiki:ConsistentModules/code.js",    "u:dev:MediaWiki:ContribsLink/code.js",    "u:dev:MediaWiki:PortableCSSPad/code.js",    "u:dev:MediaWiki:QuickDiff/code.js",    "u:dev:MediaWiki:ReferencePopups/code.js",    "u:dev:MediaWiki:RevealAnonIP/usercode.js",    "u:dev:MediaWiki:ViewRemoved/code.js",    "u:dev:MediaWiki:WhatLinksHere/code.js",  ] });