User:Eizen/global.js

window.isBlogLinkLoaded = true; window.isPTPLoaded = true; window.SeeMoreActivityButtonLoaded = true; window.DiscordIntegratorLoaded = true; window.ajaxPages = [ "Special:WikiActivity", "Special:RecentChanges", "Special:Log" ]; window.MassEditConfig = { placement: { element: "toolbar", type: "append", } };

[ {    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-tracking='admindashboard/toolbar/admin']", element: "li" }, {    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); }); } });

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:ChatBlockButton/code.3.js", "u:dev:ChatMessageWallCount/code.js", "u:dev:ChatUserPageButton.js", "u:dev:NewMessageCount.js", "u:dev:PrivateMessageAlert/code.js", ]     });    }, false); }; }

importArticles({ type: "script",  articles: [    "u:dev:AjaxRC/code.js",    "u:dev:AjaxUndo/code.js",    "u:dev:CodeQuickLinks/code.js",    "u:dev:ConsistentModules/code.js",    "u:dev:ContribsLink/code.js",    "u:dev:NullEditButton/code.js",    "u:dev:PortableCSSPad/code.js",    "u:dev:QuickDiff/code.js",    "u:dev:ReferencePopups/code.js",    "u:dev:RevealAnonIP/usercode.js",    "u:dev:Rollback/code.2.js",    "u:dev:TabKeyInserter/code.js",    "u:dev:ToolbarLinks/code.js",    "u:dev:ViewRemoved/code.js",    "u:eizen:User:Eizen/CreateUserPage.javascript",    //"u:eizen:User:Eizen/LetItSnow.javascript",    //"u:eizen:User:Eizen/RandomChristmasSong.javascript"  ] });