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 massRedirectDelay                   = 500; 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: 'https://diepio.wikia.com/wiki/Home', isMain: true, whoIsMain: false, shortName: 'dw' }, {   text: 'Changelog', url: 'https://rings-of-the-master.wikia.com/wiki/Project:NT/Changelog_News', isMain: false, whoIsMain: 'dw', shortName: 'c' }, { text: 'Event', url: 'https://rings-of-the-master.wikia.com/wiki/Project:NT/Wiki_Event_News', isMain: false, whoIsMain: 'dw', shortName: 'e' }, { text: 'Policy', url: 'https://rings-of-the-master.wikia.com/wiki/Project:NT/Wiki_Policy_News', isMain: false, whoIsMain: 'dw', shortName: 'p' }, { text: 'Tech', url: 'https://rings-of-the-master.wikia.com/wiki/Project:NT/Tech_News', isMain: false, whoIsMain: 'dw', shortName: 't' }, { text: 'FANDOM', url: 'https://rings-of-the-master.wikia.com/wiki/Project:NT/Fandom_News', isMain: false, whoIsMain: 'dw', shortName: 'f' }, { text: 'Opinion', url: 'https://rings-of-the-master.wikia.com/wiki/Project:NT/Opinion_Polls', isMain: false, whoIsMain: 'dw', shortName: 'o' }, { text: 'Quantcast', url: 'http://quantcast.com/diepio.wikia.com', isMain: false, whoIsMain: 'dw', shortName: 'qcdw' }, {   text: 'DF', url: 'https://dresdenfiles.wikia.com/wiki/Dresden_Files', isMain: true, whoIsMain: false, shortName: 'df' }, {   text: 'RC', url: 'https://dresdenfiles.wikia.com', isMain: false, whoIsMain: 'df', shortName: 'rcdf' }, {   text: 'Quantcast', url: 'http://quantcast.com/dresdenfiles.wikia.com', isMain: false, whoIsMain: 'df', shortName: 'qcdf' }, {   text: 'DA', url: 'https://dragonage.wikia.com/d/f', isMain: true, whoIsMain: false, shortName: 'da' }, {   text: '/d/g', url: 'https://dragonage.wikia.com/d/g', isMain: false, whoIsMain: 'da', shortName: 'dgda' }, {   text: '/d/m', url: 'https://dragonage.wikia.com/d/m', isMain: false, whoIsMain: 'da', shortName: 'dmda' }, {   text: '/d/reported', url: 'https://dragonage.wikia.com/d/reported', isMain: false, whoIsMain: 'da', shortName: 'drda' }, {   text: 'Quantcast', url: 'http://quantcast.com/dragonage.wikia.com', isMain: false, whoIsMain: 'da', shortName: 'qcda' }, {   text: 'Vol', url: 'https://wikia.slack.com', isMain: true, whoIsMain: false, shortName: 'vol' }, {   text: 'GDM', url: 'https://discussions.wikia.com', isMain: false, whoIsMain: 'vol', shortName: 'gdm' }, {   text: 'Vanguard', url: 'https://portability.wikia.com', isMain: false, whoIsMain: 'vol', shortName: 'vanguard' }, {   text: 'Council', url: 'https://communitycouncil.wikia.com', isMain: false, whoIsMain: 'vol', shortName: 'council' }, {   text: 'W', url: 'https://ursuul.wikia.com/wiki/Special:MyPage', isMain: true, whoIsMain: false, shortName: 'w' }, { text: 'Borderlands', url: 'https://borderlands.wikia.com/d/f', isMain: false, whoIsMain: 'w', shortName: 'bl' }, {   text: 'Animal Crossing', url: 'https://animalcrossing.wikia.com/wiki/Special:MyPage', isMain: false, whoIsMain: 'w', shortName: 'ac' }, {   text: 'Vocaloid', url: 'https://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: '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' }, {           name: 'Themes.css', href: '/wiki/MediaWiki:Themes.css' }],   userFiles: [{ name: 'Global.js', href: '//community.wikia.com/wiki/Special:MyPage/global.js' }, {           name: 'Global.css', href: '//community.wikia.com/wiki/Special:MyPage/global.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: 'Sandbox', href: '/wiki/Special:Mypage/Sandbox' }, {           name: 'Showcase', href: '/wiki/Special:Mypage/Showcase' }, {           name: 'Tags', href: '//community.wikia.com/wiki/Help:Infoboxes/Tags' }, {           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:MassRedirect/code.1.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*/