User:Eizen/global.js

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: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:NullEditButton/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:Rollback/code.2.js",    "u:dev:MediaWiki:TabKeyInserter/code.js",    "u:dev:MediaWiki:ToolbarLinks/code.js",    "u:dev:MediaWiki:ViewRemoved/code.js",    "u:eizen:User:Eizen/CreateUserPage.javascript",    //"u:eizen:User:Eizen/LetItSnow.javascript",    //"u:eizen:User:Eizen/RandomChristmasSong.javascript"  ] });