User:Aeywoo/global.js

$(function {   // Code snipped from: Bitomic (https://community.fandom.com/wiki/User:Bitomic/global.js)    // CustomTools and BannerNotifications customisation options    mw.hook("dev.banners").add(function(BannerNotification) { mw.hook("dev.ct").add(function(addButtons) {           addButtons([{ click: function { var title = mw.config.get("wgPageName"); navigator.clipboard.writeText(title); new BannerNotification("This page\'s title has been copied to your clipboard:\n" + title, "success", undefined, 3000).show; },                   icon: "pages", placement: "page-tools-left", position: -1, text: "Copy title" }, {                   click: function { navigator.clipboard.writeText(window.location.href); new BannerNotification("This page\'s URL has been copied to your clipboard:\n" + window.location.href, "success", undefined, 3000).show; },                   icon: "link", placement: "page-tools-left", position: -1, text: "Copy full link" }           ]);        });    });    // Modern2010Editor Talk Page Fix    if (window.location.search.search("section=new") !== -1) {        $("#wpSummaryLabel").detach.prependTo(".editOptions");    }    // 0. VanguardTools configuration options    window.vanguardToolsConfig = {        nav: true,        template: true,        adminalert: true,        icons: true,        toolbox: true    };    // 1. AjaxRC configuration options    window.ajaxRefresh = 30000;    // 2. ShowWROnToolbar configuration options    window.ShowWROnToolbarDisableCache = true;    // 3. MultiUpload configuration options    window.MultiUploadoption = {        max: 160,        defaultlicense: "Fairuse",        //defaultlicense: "From Wikimedia",    };    // 4. CustomizeAce configuration options    window.aceCustomSettings = {        wrap: true,        theme: "tomorrow_night",        tabSize: 4,        showInvisibles: true };   // 5. ThankYou configuration options window.tyMaxDays = 30; window.tyMode = "latest"; window.tyPosition = 0; // 6. OfficialWikiBadges configuration options window.officialWikisBadge = { override: false, wikis: [ "minecraft_gamepedia", "powerwashsimulator"/*, "doorsgame"*/ ]   };    // 7. AutoCreateUserPages configuration options window.AutoCreateUserPagesConfig = { content: { 2: "",           3: "",            1202: false },       summary: "Creating my user page." };   // 8. AnnouncementsIgnore configuration options window.announcementsIgnore = { option: "opt-out-all", exceptWikiIds: [ 177, // Community Wiki 239, // Australia Wiki 7931, // Dev Wiki 10513, // Templates Wiki 751296, // Steam Trading Cards Wiki 922669, // Unturned Bunker Wiki 1752064, // Control Wiki 1995962, // Quantum Science Wiki (Roblox) 2293798, // Feed the Beast Wiki 2293961, // Zelda Wiki 2294162, // Gamepedia Help Wiki 2294461, // Minecraft Wiki 2295198, // Terra Nil Wiki 2743058, // PowerWash Simulator Wiki 2873388, // Don't Escape Wiki 2935621, // The Darkside Detective Wiki 3019914, // DOORS Wiki (Roblox) 3184186, // Makeship Wiki ]   };    // 9. Matrix configuration options window.MatrixConfig = { private: [ "https://aeywoo.fandom.com/", "https://control.fandom.com/fr/", "https://doors-game.fandom.com/de/", "https://doors-game.fandom.com/es/", "https://doors-game.fandom.com/pt-br/", "https://doors-game.fandom.com/ru/", "https://doors-game.fandom.com/zh/", "https://doors-game.fandom.com/tl/" ]   };    // 10. CustomTools configuration options window.CustomTools = [ {           link: "Special:AllPages?namespace=8", placement: "my-tools", position: 0, text: "MediaWiki Pages" }, {           link: "Special:AllPages?namespace=10", placement: "my-tools", position: 1, text: "All Templates" }, {           link: "Special:AllPages?namespace=14", placement: "my-tools", position: 2, text: "All Categories" }, {           link: "Special:Version", placement: "my-tools", position: 3, text: "Special Version" }, {           link: "https://www.w3schools.com/colors/colors_picker.asp", placement: "page-tools-right", position: 3, text: "Colour Picker" }   ];    // 11. GlobalNavButtons configuration options window.globalNavButtons = [{ text: "Wikis", url: "", icon: " ", isMain: true, shortName: "w" }, {           text: "SOAP Wiki", url: "https://soap.fandom.com/wiki/", whoIsMain: "w" }, {           text: "Developer Hub", url: "https://dev.fandom.com/wiki/", whoIsMain: "w" }, {           text: "Portability Hub", url: "https://portability.fandom.com/wiki/", whoIsMain: "w" }, {           text: "Templates Wiki", url: "https://templates.fandom.com/wiki/", whoIsMain: "w" }, {           text: "JustLeafy's Wiki", url: "https://justleafy.fandom.com/wiki/", whoIsMain: "w" }, {           text: "Fandom Commons", url: "https://commons.fandom.com/wiki/", whoIsMain: "w" }, {           text: "Community Central", url: "https://community.fandom.com/wiki/", whoIsMain: "w" }, {           text: "Adoption Requests", url: "https://community.fandom.com/wiki/Adoption:Requests", whoIsMain: "w" }, {           text: "Interlanguage link requests", url: "https://community.fandom.com/wiki/Community_Central:Interlanguage_link_requests", whoIsMain: "w" }, {           text: "UCP Internal Test Starter Wiki", url: "https://ucp-internal-test-starter.fandom.com/wiki/", whoIsMain: "w" }, {           text: "Games", url: "", icon: " ", isMain: true, shortName: "gw" }, {           text: "FTB Wiki", url: "https://ftb.gamepedia.com/wiki/", whoIsMain: "gw" }, {           text: "DOORS Wiki", url: "https://doors-game.fandom.com/wiki/", whoIsMain: "gw" }, {           text: "Control Wiki", url: "https://control.fandom.com/wiki/", whoIsMain: "gw" }, {           text: "Terra Nil Wiki", url: "https://terranil.gamepedia.com/wiki/", whoIsMain: "gw" }, {           text: "Makeship Wiki", url: "https://makeship.fandom.com/wiki/", whoIsMain: "gw" }, {           text: "Minecraft Wiki", url: "https://minecraft.gamepedia.com/wiki/", whoIsMain: "gw" }, {           text: "Subnautica Wiki", url: "https://subnautica.fandom.com/wiki/", whoIsMain: "gw" }, {           text: "The Witness Wiki", url: "https://thewitness.gamepedia.com/wiki/", whoIsMain: "gw" }, {           text: "SCP: Observer Wiki", url: "https://scp-observer.fandom.com/wiki/", whoIsMain: "gw" }, {           text: "Unturned Bunker Wiki", url: "https://unturned.fandom.com/wiki/", whoIsMain: "gw" }, {           text: "The Don't Escape Wiki", url: "https://dont-escape.fandom.com/wiki/", whoIsMain: "gw" }, {           text: "Steam Trading Cards Wiki", url: "https://steamtradingcards.fandom.com/wiki/", whoIsMain: "gw" }, {           text: "PowerWash Simulator Wiki", url: "https://powerwash-simulator.fandom.com/wiki/", whoIsMain: "gw" }, {           text: "The Darkside Detective Wiki", url: "https://darkside-detective.fandom.com/wiki/", whoIsMain: "gw" }, {           text: "CSS/JS", url: "", icon: " ", // Icon made by Freepik from https://www.flaticon.com/ isMain: true, shortName: "cj" }, {           text: "ImportJS", url: mw.util.getUrl("MediaWiki:ImportJS"), whoIsMain: "cj" }, {           text: "Global CSS", url: "https://community.fandom.com/wiki/User:Aeywoo/global.css", whoIsMain: "cj" }, {           text: "Global JS", url: "https://community.fandom.com/wiki/User:Aeywoo/global.js", whoIsMain: "cj" }, {           text: "Common JS", url: mw.util.getUrl("MediaWiki:Common.js"), whoIsMain: "cj" }, {           text: "Common CSS", url: mw.util.getUrl("MediaWiki:Common.css"), whoIsMain: "cj" }, {           text: "FandomMobile CSS", url: mw.util.getUrl("MediaWiki:FandomMobile.css"), whoIsMain: "cj" }, {           text: "FandomDesktop JS", url: mw.util.getUrl("MediaWiki:Fandomdesktop.js"), whoIsMain: "cj" }, {           text: "FandomDesktop CSS", url: mw.util.getUrl("MediaWiki:Fandomdesktop.css"), whoIsMain: "cj" }, {           text: "Files", url: "", icon: "    ", // https://www.svgrepo.com/svg/46114/upload isMain: true, shortName: "f" }, {           text: "Recent Changes", url: mw.util.getUrl("Special:RecentChanges"), whoIsMain: "f" }, {           text: "New Pages", url: mw.util.getUrl("Special:NewPages"), whoIsMain: "f" }, {           text: "New Files", url: mw.util.getUrl("Special:NewFiles"), whoIsMain: "f" }, {           text: "Licenses", url: mw.util.getUrl("MediaWiki:Licenses"), whoIsMain: "f" }, {           text: "Upload", url: mw.util.getUrl("Special:Upload"), whoIsMain: "f" }, {           text: "Others", url: "", icon: " ", isMain: true, shortName: "ot" }, {           text: "Change Content Model", url: mw.util.getUrl("Special:ChangeContentModel"), whoIsMain: "ot" }, {           text: "Zendesk Request", url: "https://support.fandom.com/hc/en-us/requests/new?ticket_form_id=360000931354", whoIsMain: "ot" }, {           text: "Wiki Navigation", url: mw.util.getUrl("MediaWiki:Wiki-navigation"), whoIsMain: "ot" }, {           text: "Special Pages", url: mw.util.getUrl("Special:SpecialPages"), whoIsMain: "ot" }, {           text: "List Users", url: mw.util.getUrl("Special:ListUsers/sysop"), whoIsMain: "ot" }, {           text: "Extras", url: "", isMain: true, shortName: "xtrs" }, {           text: "Colour Picker", url: "https://www.w3schools.com/colors/colors_picker.asp", whoIsMain: "xtrs" }, {           text: "W3Schools", url: "https://www.w3schools.com/", whoIsMain: "xtrs" }, {           text: "Autoprefixer CSS", url: "https://autoprefixer.github.io/", whoIsMain: "xtrs" }, {           text: "String Functions", url: "https://www.mediawiki.org/wiki/Extension:StringFunctions", whoIsMain: "xtrs" }, {           text: "Conditional expressions", url: "https://en.wikipedia.org/wiki/Help:Conditional_expressions", whoIsMain: "xtrs" }, {           text: "Frens", url: "", icon: " ", isMain: true, shortName: "frens" }, {           text: "Friendly Mountain12", url: mw.util.getUrl("User:Friendly Mountain12"), whoIsMain: "frens" }, {           text: "BryghtShadow", url: mw.util.getUrl("User:BryghtShadow"), whoIsMain: "frens" }, {           text: "Saurmandal", url: mw.util.getUrl("User:Saurmandal"), whoIsMain: "frens" }, {           text: "JustLeafy", url: mw.util.getUrl("User:JustLeafy"), whoIsMain: "frens" }, {           text: "Sophiedp", url: mw.util.getUrl("User:Sophiedp"), whoIsMain: "frens" }, {           text: "Dorumin", url: mw.util.getUrl("User:Dorumin"), whoIsMain: "frens" }, {           text: "Philo04", url: mw.util.getUrl("User:Philo04"), whoIsMain: "frens" }, {           text: "Dorito", url: mw.util.getUrl("User:Joritochip"), whoIsMain: "frens" }, {           text: "Robyn", url: mw.util.getUrl("User:Robyn_Grayson"), whoIsMain: "frens" }   ];    if (mw.config.get("wgNamespaceIds").gadget) { window.globalNavButtons.push({           text: "Gadgets",            url: mw.util.getUrl("Special:Gadgets"),            whoIsMain: "ot"        }); }   if (/sysop|administrator|content-moderator|threadmoderator|rollback/.test(mw.config.get("wgUserGroups").join)) { window.globalNavButtons.push({           text: "Staff",            url: "",            icon: "<svg class=\"wds-icon\"><svg id=\"wds-avatar-badges-admin\" viewBox=\"0 0 18 18\"><path d=\"M5.855 7.127h1.393c.254 0 .386-.089.464-.313l.875-2.517A.416.416 0 0 1 8.99 4a.408.408 0 0 1 .417.29c.293.845.585 1.69.879 2.534.073.21.207.302.444.302h2.795c.143 0 .27.029.366.134a.375.375 0 0 1-.062.58c-.33.233-.665.458-1 .686l-1.315.9c-.182.124-.236.284-.167.485l.874 2.515c.057.163.053.313-.078.444a.44.44 0 0 1-.573.044l-1.008-.69-1.302-.889a.432.432 0 0 0-.525.001c-.77.526-1.54 1.053-2.31 1.577-.28.19-.645.05-.686-.264a.435.435 0 0 1 .026-.191c.29-.846.582-1.69.874-2.534.076-.222.026-.37-.17-.505L4.196 7.864c-.17-.116-.233-.283-.177-.454.058-.178.21-.282.424-.282.47-.002.94-.001 1.411-.001z\">   ",            isMain: true,            shortName: "staff"        }); }   if (/sysop|administrator|content-moderator|threadmoderator/.test(mw.config.get("wgUserGroups").join)) { window.globalNavButtons.push({           text: "Message Deletion",            url: "/Special:SocialActivity?deleted=true&containerTypes=WALL",            whoIsMain: "staff"        }, {            text: "Reported Posts",            url: "/f/reported",            whoIsMain: "staff"        }); }   if (/sysop|administrator/.test(mw.config.get("wgUserGroups").join)) { window.globalNavButtons.push({           text: "Admin Dashboard",            url: mw.util.getUrl("Special:AdminDashboard"),            whoIsMain: "staff"        }, {            text: "Announcements",            url: mw.util.getUrl("Special:Announcements"),            whoIsMain: "staff"        }, {            text: "Theme Designer",            url: mw.util.getUrl("Special:ThemeDesigner"),            whoIsMain: "staff"        }, {            text: "Delete Reasons",            url: mw.util.getUrl("MediaWiki:Deletereason-dropdown"),            whoIsMain: "ot"        }, {            text: "User Rights",            url: mw.util.getUrl("Special:UserRights"),            whoIsMain: "staff"        }, {            text: "Block",            url: mw.util.getUrl("Special:Block"),            whoIsMain: "staff"        }); }   if (mw.config.get("wgWikiID") == "steamtradingcards") { window.globalNavButtons.push({           text: "Steam Card Exchange",            url: "https://www.steamcardexchange.net/index.php",            whoIsMain: "xtrs"        }, {            text: "Steam Trading Cards",            url: "https://steam.tools/cards/",            whoIsMain: "xtrs"        }, {            text: "Completionist Me",            url: "https://completionist.me/",            whoIsMain: "xtrs"        }); }   if (mw.config.get("wgWikiID") == "ftb_gamepedia") { window.globalNavButtons.push({           text: "FTB",            url: "",            icon: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" class=\"wds-icon\"><path d=\"M3.499 3.043c-.641.108-1.104.355-1.603.853-.4.4-.6.717-.771 1.217l-.105.307-.011 5.02c-.01 4.426-.004 5.057.051 5.33.076.375.221.728.433 1.05.184.279 3.161 3.29 3.527 3.567.287.218.582.371.96.498l.28.095 5.58.011c6.13.013 5.891.021 6.483-.227.503-.211.701-.382 2.38-2.061 1.679-1.679 1.85-1.877 2.061-2.38.247-.589.24-.412.227-5.903l-.011-5-.105-.307c-.171-.5-.371-.817-.771-1.217-.41-.41-.741-.616-1.243-.775l-.321-.101-8.42-.006c-4.631-.003-8.511.01-8.621.029m16.917 2.054c.199.099.388.288.487.487.075.152.077.289.077 5.016 0 4.658-.003 4.866-.074 5-.103.193-3.043 3.14-3.266 3.273l-.18.107H12c-5.232 0-5.466-.003-5.6-.074-.192-.101-3.184-3.087-3.293-3.286l-.087-.16-.011-4.76c-.008-3.276.001-4.814.031-4.933a1.02 1.02 0 0 1 .686-.721c.085-.025 3.13-.037 8.334-.033 8.023.007 8.203.009 8.356.084M7.48 7.657c-.425.119-.596.248-1.449 1.096-.55.546-.857.881-.91.995a.809.809 0 0 0-.002.682c.095.211.408.527.621.629.203.097.516.099.7.004.077-.04.459-.389.85-.776l.709-.703.731.723c.672.666.748.729.96.795.219.069.24.069.448.004.425-.134.829-.623.829-1.004 0-.346-.114-.505-.959-1.342-.833-.824-1.057-.992-1.466-1.098-.282-.073-.808-.075-1.062-.005m8 0c-.425.119-.596.248-1.449 1.096-.55.546-.857.881-.91.995a.809.809 0 0 0-.002.682c.095.211.408.527.621.629.203.097.516.099.7.004.077-.04.459-.389.85-.776l.709-.703.731.723c.672.666.748.729.96.795.219.069.24.069.448.004.425-.134.829-.623.829-1.004 0-.346-.114-.505-.959-1.342-.833-.824-1.057-.992-1.466-1.098-.282-.073-.808-.075-1.062-.005m-6.866 6.4a.814.814 0 0 0-.505.396c-.074.139-.089.231-.089.547 0 .331.013.403.1.558.11.197.294.34.515.401.197.055 6.533.055 6.73 0a.842.842 0 0 0 .515-.401c.087-.156.1-.226.099-.558-.001-.433-.081-.645-.301-.801-.28-.2-.267-.199-3.694-.196-2.512.002-3.24.014-3.37.054\">  ", isMain: true, shortName: "ftb" }, {           text: "Sheet List", url: mw.util.getUrl("Special:SheetList"), whoIsMain: "ftb" }, {           text: "Tile List", url: mw.util.getUrl("Special:TileList"), whoIsMain: "ftb" }, {           text: "Tile Translator", url: mw.util.getUrl("Special:TileTranslator"), whoIsMain: "ftb" }, {           text: "View Tile", url: mw.util.getUrl("Special:ViewTile"), whoIsMain: "ftb" }, {           text: "What Uses This Tile?", url: mw.util.getUrl("Special:WhatUsesThisTile"), whoIsMain: "ftb" });   }    if (/bot/.test(mw.config.get("wgUserGroups").join)) {        window.globalNavButtons.push({ text: "Remove Legacy Threads", url: mw.util.getUrl("Special:BlankPage/RemoveLegacyThreads"), whoIsMain: "ot" });   }    if (/bot/.test(mw.config.get("wgUserGroups").join)) {        if (mw.config.get("wgWikiID") == "ftb_gamepedia") {            window.globalNavButtons.push({ text: "CreateTileSheet", url: mw.util.getUrl("Special:CreateTileSheet"), whoIsMain: "ftb" }, {               text: "Sheet Manager", url: mw.util.getUrl("Special:SheetManager"), whoIsMain: "ftb" }, {               text: "Tile Manager", url: mw.util.getUrl("Special:TileManager"), whoIsMain: "ftb" });       }    }    //window.GlobalNavButtonsConf = {    //    keepLinks: ["start-a-wiki"]    //};    //window.globalNavButtons.push({ //   text: "Start A Wiki", //   url: "https://community-137.fandom.com/wiki/Special:CreateNewWiki", //   icon: "<svg class=\"wds-icon wds-icon-small\"><use xlink:href=\"#wds-icons-add-small\">  ", //   isMain: false //});   importScriptPage("User:Aeywoo/vanguardTools.js", "aeywoo");    importScriptPage("User:Aeywoo/gamepediaTheme.js", "aeywoo");    importScriptPage("User:Aeywoo/globalNavButtons.js", "aeywoo");    importScriptPage("User:Aeywoo/sourceEditorFooter.js", "aeywoo");    //pushed to dev: importScriptPage("User:Aeywoo/officialWikiBadges.js", "aeywoo");    importScriptPage("User:KockaAdmiralac/LinkModifications.js", "kocka");    importScriptPage("User:Aeywoo/multiUpload.js", "steamtradingcards");    if (mw.config.get("wgWikiID") === "wikia" || mw.config.get("wgWikiID") === "dev") {        importArticles({ type: "script", articles: [ "u:dev:MediaWiki:PreviewRail.js" ]       });    }    importArticles({ type: "script", articles: [ /* Enabled */ "u:dev:MediaWiki:Sofix.js", "u:dev:MediaWiki:AjaxRC.js", "u:dev:MediaWiki:Matrix.js", "u:dev:MediaWiki:Stella.js", "u:dev:MediaWiki:ThankYou.js", "u:dev:MediaWiki:QuickJSRT.js", "u:dev:MediaWiki:CustomTools.js", //"u:dev:MediaWiki:MultiUpload.js", //"u:dev:MediaWiki:PatrolPanel.js", "u:dev:MediaWiki:PurgeButton.js", "u:dev:MediaWiki:CustomizeAce.js", "u:dev:MediaWiki:ThemeToggler.js", "u:dev:MediaWiki:UCXSearchBar.js", "u:dev:MediaWiki:CodeSelectAll.js", "u:dev:MediaWiki:FastFileDelete.js", //"u:dev:MediaWiki:GamepediaTheme.js", "u:dev:MediaWiki:AjaxBatchDelete.js", "u:dev:MediaWiki:CacheCheck/code.js", "u:dev:MediaWiki:HistoryKey/code.js", "u:dev:MediaWiki:MassRename/code.js", "u:dev:MediaWiki:ReadProgressBar.js", "u:dev:MediaWiki:ShowWROnToolbar.js", "u:dev:MediaWiki:DiscussionsAFLog.js", "u:dev:MediaWiki:RestoreRevButton.js", //"u:dev:MediaWiki:GlobalNavButtons.js", "u:dev:MediaWiki:ChangeModelButton.js", "u:dev:MediaWiki:ImportJSPage/code.js", "u:dev:MediaWiki:BannerNotification.js", "u:dev:MediaWiki:OfficialWikisBadge.js", "u:dev:MediaWiki:SearchSuggest/code.js", "u:dev:MediaWiki:AnnouncementsIgnore.js", "u:dev:MediaWiki:AutoCreateUserPages.js", "u:dev:MediaWiki:MisspelledPage/code.js", "u:dev:MediaWiki:RemoveLegacyThreads.js", "u:dev:MediaWiki:MinimalTestModeAlert.js", "u:dev:MediaWiki:ModulesLinkToModules.js", "u:dev:MediaWiki:DisableInfoboxBuilder.js", "u:dev:MediaWiki:ViewInContentLang/code.js", "u:dev:MediaWiki:Discussions Restore All.js", "u:dev:MediaWiki:MassCategorization/code.js", "u:dev:MediaWiki:InterwikisOnSpecialPages.js", "u:dev:MediaWiki:Discussions Delete All/code.js" /* Disabled *//* "u:dev:MediaWiki:CopyTitle.js", "u:dev:MediaWiki:HydraRevived.js", "u:dev:MediaWiki:OasisRevived.js", "u:dev:MediaWiki:MassEdit/code.js", "u:dev:MediaWiki:ThemeSelector.js", "u:dev:MediaWiki:SyntaxHighlight.js", "u:dev:MediaWiki:QuickTitle/code.js", "u:dev:MediaWiki:UploadMultipleFiles.js", "u:dev:MediaWiki:CollapsiblePageTools.js", "u:dev:MediaWiki:AnchoredRollback/code.js"*/ ]   }); });