User:Ursuul/global.js

///////////////////////////////////////////////////////////////////////// /****************************** Functions ******************************/ ///////////////////////////////////////////////////////////////////////// /* Variables */ var config = mw.config.get([   'wgCanonicalSpecialPageName',    'wgPageName',    'wgArticlePath',    'wgCityId' ]), $KIBpageName = 'Template:' + (config.wgPageName).split('/')[1] + '?action=edit&useeditor=source'; //End Variables*/

/* * @name:  Kill Infobox Builder * @author: Eizen * @source: https://community.wikia.com/wiki/User:Eizen/global.js */ if (config.wgCanonicalSpecialPageName === 'InfoboxBuilder') { window.location.href = (config.wgArticlePath).replace('$1', $KIBpageName); }//End KIB*/

/* Reorder SUG */ function ShowUserGroups_sorter(a, b) { var PredeterminedOrder = { 'staff':                      -100, 'util':                        -99, 'restricted-login':            -98, 'restricted-login-auto':       -97, 'restricted-login-exempt':     -96, 'devboxpanel':                 -95, 'translator':                  -94, 'content-reviewer':            -93, 'lookupuser':                  -92, 'lookupcontribs':              -91, 'helper':                      -80, 'vstf':                        -70, 'global-discussions-moderator': -60, 'voldev':                      -50, 'content-volunteer':           -40, 'vanguard':                    -30, 'council':                     -20, 'authenticated':               -10, 'fandom-editor':                 0, 'bot-global':                   10, 'bot':                         110, 'codeadmin':                   120, 'checkuser':                   130, 'bureaucrat':                  140, 'sysop':                       150, 'content-moderator':           160, 'threadmoderator':             170, 'chatmoderator':               180, 'rollback':                    190, 'autoconfirmed':               200 };   var sortA = typeof PredeterminedOrder[a] === 'number' ? PredeterminedOrder[a] : 100;   var sortB = typeof PredeterminedOrder[b] === 'number' ? PredeterminedOrder[b] : 100;   return sortA - sortB; }//End RSUG*/

///////////////////////////////////////////////////////////////////////// /************************ Import Configurations ************************/ ///////////////////////////////////////////////////////////////////////// /* General */ batchDeleteDelay                    = 10;//revert to 250 massCategorizationDelay             = 250; massProtectDelay                    = 10;//revert to 250 massRenameDelay                     = 500; massRenameSummary                   = 'Automatic Process'; nullEditDelay                       = 1000; WHAMDelay                           = 250; window.GlobalChatJS_useServiceWorker = true; window.mobileText                   = 'Switch to Mercury'; window.SeeMoreActivityButtonRC      = true; window.cvCaseSensitive              = 'checked'; window.massEditConfig = { editInterval: 500 }; window.railWAM = { load: true };//End G*/

/* Global Nav Buttons */ window.globalNavButtons = [{ text: 'DW', url: '//diepio.wikia.com/wiki/Home', isMain: true, whoIsMain: false, shortName: 'dw' }, {   text: 'Changelog', url: '//rings-of-the-master.wikia.com/wiki/Project:NT/Changelog_News', isMain: false, whoIsMain: 'dw', shortName: 'c' }, { text: 'Event', url: '//rings-of-the-master.wikia.com/wiki/Project:NT/Wiki_Event_News', isMain: false, whoIsMain: 'dw', shortName: 'e' }, { text: 'Policy', url: '//rings-of-the-master.wikia.com/wiki/Project:NT/Wiki_Policy_News', isMain: false, whoIsMain: 'dw', shortName: 'p' }, { text: 'Tech', url: '//rings-of-the-master.wikia.com/wiki/Project:NT/Tech_News', isMain: false, whoIsMain: 'dw', shortName: 't' }, { text: 'FANDOM', url: '//rings-of-the-master.wikia.com/wiki/Project:NT/Fandom_News', isMain: false, whoIsMain: 'dw', shortName: 'f' }, { text: 'Opinion', url: '//rings-of-the-master.wikia.com/wiki/Project:NT/Opinion_Polls', isMain: false, whoIsMain: 'dw', shortName: 'o' }, { text: 'Quantcast', url: '//quantcast.com/diepio.wikia.com', isMain: false, whoIsMain: 'dw', shortName: 'qcdw' }, {   text: 'DF', url: '//dresdenfiles.wikia.com/wiki/Dresden_Files', isMain: true, whoIsMain: false, shortName: 'df' }, {   text: 'RC', url: '//dresdenfiles.wikia.com', isMain: false, whoIsMain: 'df', shortName: 'rcdf' }, {   text: 'Quantcast', url: '//quantcast.com/dresdenfiles.wikia.com', isMain: false, whoIsMain: 'df', shortName: 'qcdf' }, {   text: 'DA', url: '//dragonage.wikia.com/d/f', isMain: true, whoIsMain: false, shortName: 'da' }, {   text: '/d/g', url: '//dragonage.wikia.com/d/g', isMain: false, whoIsMain: 'da', shortName: 'dgda' }, {   text: '/d/m', url: '//dragonage.wikia.com/d/m', isMain: false, whoIsMain: 'da', shortName: 'dmda' }, {   text: '/d/reported', url: '//dragonage.wikia.com/d/reported', isMain: false, whoIsMain: 'da', shortName: 'drda' }, {   text: 'Quantcast', url: '//quantcast.com/dragonage.wikia.com', isMain: false, whoIsMain: 'da', shortName: 'qcda' }, {   text: 'SC', url: '/wiki/Special:Contact/general', isMain: true, whoIsMain: false, shortName: 'sc' }, {   text: 'S:C/bug', url: '/wiki/Special:Contact/bug', isMain: false, whoIsMain: 'sc', shortName: 'scb' }, {   text: 'S:C/feedback', url: '/wiki/Special:Contact/feedback', isMain: false, whoIsMain: 'sc', shortName: 'scf' }, {   text: 'S:C/bad-ad', url: '/wiki/Special:Contact/bad-ad', isMain: false, whoIsMain: 'sc', shortName: 'scba' }, {   text: 'S:C/close-wiki', url: '/wiki/Special:Contact/close-wiki', isMain: false, whoIsMain: 'sc', shortName: 'sccw' }, {   text: 'S:C/wiki-name-change', url: '/wiki/Special:Contact/wiki-name-change', isMain: false, whoIsMain: 'sc', shortName: 'scwnc' }, {   text: 'S:C/account-issue', url: '/wiki/Special:Contact/account-issue', isMain: false, whoIsMain: 'sc', shortName: 'scai' }, {   text: 'All', url: '/wiki/Special:Contact', isMain: false, whoIsMain: 'sc', shortName: 'scall' }, {   text: 'V', url: '//community.wikia.com/wiki/Blog:FANDOM_Staff_Blog', isMain: true, whoIsMain: false, shortName: 'v' }, { text: 'Rights', url: '//community.wikia.com/wiki/Special:Log/rights', isMain: false, whoIsMain: 'v', shortName: 'vrights' }, {   text: 'Global.css', url: '//diepio.wikia.com/wiki/MediaWiki:Global.css?action=edit', isMain: false, whoIsMain: 'v', shortName: 'vgcss' }, {   text: 'Highlight.css', url: '//dev.wikia.com/wiki/MediaWiki:Highlight.css?action=history', isMain: false, whoIsMain: 'v', shortName: 'vhcss' }, {   text: 'Council', url: '//communitycouncil.wikia.com', isMain: false, whoIsMain: 'v', shortName: 'council' }, {   text: 'Vanguard', url: '//portability.wikia.com/wiki/Special:PortabilityDashboard', isMain: false, whoIsMain: 'v', shortName: 'vanguard' }, {   text: 'GDM', url: '//discussions.wikia.com', isMain: false, whoIsMain: 'v', shortName: 'gdm' }, {   text: 'W', url: '//wikia.slack.com', isMain: true, whoIsMain: false, shortName: 'w' }, { text: 'Borderlands', url: '//borderlands.wikia.com/d/f', isMain: false, whoIsMain: 'w', shortName: 'bl' }, {   text: 'Animal Crossing', url: '//animalcrossing.wikia.com/wiki/Special:MyPage', isMain: false, whoIsMain: 'w', shortName: 'ac' }, {   text: 'Vocaloid', url: '//vocaloid.wikia.com/wiki/Special:MyPage', isMain: false, whoIsMain: 'w', shortName: 'vl' }];//End GNB*/

/* Code Quick Links */ window.customCodeQuickLinks = { replaceAllDefaultLinks: true, linkSet: { siteFiles: [{ name: 'JSPages', href: '/wiki/Special:JSPages' }, {           name: 'ImportJS', href: '/wiki/MediaWiki:ImportJS' }, {           name: 'Themes.css', href: '/wiki/MediaWiki:Themes.css' }, {           name: 'Common.js', href: '/wiki/MediaWiki:Common.js' }, {           name: 'Common.css', href: '/wiki/MediaWiki:Common.css' }, {           name: 'Wikia.js', href: '/wiki/MediaWiki:Wikia.js' }, {           name: 'Wikia.css', href: '/wiki/MediaWiki:Wikia.css' }, {           name: 'Chat.js', href: '/wiki/MediaWiki:Chat.js' }, {           name: 'Chat.css', href: '/wiki/MediaWiki:Chat.css' }, {           name: 'S:WF', href: '/wiki/Special:WikiFeatures' }, {           name: 'S:AI', href: '/wiki/Special:AllInfoboxes' }, {           name: 'S:I/NPI', href: '/wiki/Special:Insights/nonportableinfoboxes' }],       userFiles: [{ name: 'Global.js', href: '//community.wikia.com/wiki/Special:MyPage/global.js' }, {           name: 'ImportCSS', href: '//community.wikia.com/wiki/Special:MyPage/global.css' }, {           name: 'Global.css', href: '//community.wikia.com/wiki/Special:MyPage/g.css' }, {           name: 'Common.js', href: '/wiki/Special:MyPage/common.js' }, {           name: 'Common.css', href: '/wiki/Special:MyPage/common.css' }, {           name: 'Wikia.js', href: '/wiki/Special:MyPage/wikia.js' }, {           name: 'Wikia.css', href: '/wiki/Special:MyPage/wikia.css' }, {           name: 'Chat.js', href: '/wiki/Special:MyPage/chat.js' }, {           name: 'Chat.css', href: '/wiki/Special:MyPage/chat.css' }, {           name: 'Subpages', href: '/wiki/Special:PrefixIndex/User:Ursuul' }, {           name: 'Sandbox', href: '/wiki/Special:Mypage/Sandbox' }, {           name: 'Properties', href: '//portability.wikia.com/wiki/User:Ursuul/properties.css?action=edit' }]   } };//End CQL*/

///////////////////////////////////////////////////////////////////////// /******************************* Imports *******************************/ ///////////////////////////////////////////////////////////////////////// /* Universal Imports */ importArticles({   type: 'script',    articles: [        'u:community:User:TyA/AutoEditDropdown.js',        'u:dev:AjaxBatchDelete/code.2.js',        'u:dev:AjaxUndo/code.js',        'u:dev:AnchoredRollback/code.js',        'u:dev:AutoEditPages/code.js',        'u:dev:BlogLink/code.js',        'u:dev:CodeQuickLinks/code.js',        'u:dev:EditConflictAlert/code.js',        'u:dev:FindAndReplace/code.js',        'u:dev:GlobalChatJS.js',        'u:dev:GlobalNavButtons.js',        'u:dev:MarkBlocked.js',        'u:dev:MassCategorization/code.js',        'u:dev:MassEdit/code.js',        'u:dev:MassNullEdit/code.js',        'u:dev:MassProtect/code.js',        'u:dev:MassRename/code.js',        'u:dev:MassRenameRevert/code.js',        'u:dev:MastheadGender/code.js',        'u:dev:MultipleFileDelete/code.js',//do not remove über script        'u:dev:NullEditButton/code.js',        'u:dev:PortableCSSPad/code.js', 'u:dev:RedirectManagement/code.js', 'u:dev:ReferencePopups/code.js', 'u:dev:Rollback/code.js', 'u:dev:SearchSuggest/code.js', 'u:dev:SeeMoreActivityButton/code.js', 'u:dev:ShowUserGroups.js', 'u:dev:SkinSwitchButton/code.js', 'u:dev:Thread Inspection/code.js', 'u:dev:UnhideUserMasthead/code.js', 'u:dev:VSTFReport.js', 'u:dev:WHAM/code.2.js', 'u:dev:WLHEditLinks/code.js', 'u:dev:WallGreetingButton/code.js', 'u:dev:Wikimarks/code.js', 'u:dev:WorkingMoreUsersCount.js', 'u:eizen:User:Eizen/AnonLookup.javascript', 'u:elderscrolls:Common.js/DiscussionsLinks.js' ] });//End UI*/

/* Wiki-specific imports */ if (['193260', '65099'].indexOf(config.wgCityId) !== -1) { importArticle({       type: 'style',        article: 'u:dev:MediaWiki:FANSUN.css'    }, {        type: 'script',        article: 'u:dev:FANSUN.js'    }); }//End WSI*/