User:TheGoldenPatrik1/global.js

/***********************************************************************/ /***************************** Doc and Toc *****************************/ /***********************************************************************/ /* DOCUMENTATION * @Author  TheGoldenPatrik1 * @Purpose Scripts imported for global use */ /* TABLE OF CONTENTS * Section 1 - Functions * Section 2 - Configurations * Section 3 - Imports */ /***********************************************************************/ /******************************* Functions *****************************/ /***********************************************************************/ /* Variables */ var config = mw.config.get([   'wgCityId',    'wgCanonicalSpecialPageName',    'wgPageName',    'wgArticlePath',    'debug'    ]), $pageName = 'Template:' + (config.wgPageName).split("/")[1] + '?action=edit&useeditor=source', cgn_color = window.getComputedStyle(document.querySelector('.wds-community-header__sitename a'), null).getPropertyValue('color'), cgn_background = window.getComputedStyle(document.querySelector('.wds-community-header'), null).getPropertyValue('background-color'), cgn_wrapper = document.querySelector('.wds-global-navigation-wrapper').style; //End Variables */

/* BiglistButton | UsingCodeBy KockaAdmiralac */ if (config.wgCityId === '65099') { $('#WikiaBar .toolbar .tools').append(       $('').append( $('', {               href: mw.util.getUrl('Report:Spam/Biglist'),                text: 'Biglist'            }) )   ); }//End BiglistButton */

/* CustomGlobalNavigation | By DuckeyD */ $(function { cgn_wrapper.setProperty('--cgn-color-background', cgn_background);  cgn_wrapper.setProperty('--cgn-color-text', cgn_color);  cgn_wrapper.setProperty('--cgn-color-text-secondary', cgn_color);  cgn_wrapper.setProperty('--cgn-color-accent', cgn_color);  cgn_wrapper.setProperty('--cgn-color-chevron', cgn_color); });//End CGN */

/* Kill Infobox Builder | By Eizen */ if (config.wgCanonicalSpecialPageName === 'InfoboxBuilder') { window.location.href = (config.wgArticlePath).replace('$1', $pageName); }//End KIB */

/* ModifiedToggleDebugMode | By Cqm */ 'use strict'; function init { var href; if (config.debug) { href = location.href.replace(/[?&]debug=.+?([&#]|$)/, '$1'); } else { href = location.pathname + location.search + (location.search ? '&' : '?') + 'debug=1' + location.hash; }       $('#WikiaBarWrapper .tools, #p-tb ul').append(            $('')                .addClass('dev-debugmode')                .append( $('') .attr({                           href: href,                            id: 'dev-debugmode-toggle'                        }) .css('cursor', 'pointer') .text(                           config.debug ?                                 'Un-Debug' :                                'Debug'                        ) )       );    }    $(init); }(jQuery, mediaWiki));//End MTDM */
 * (function ($, mw) {

/***********************************************************************/ /**************************** Configurations ***************************/ /***********************************************************************/ batchDeleteDelay = 250; massProtectDelay = 500; nullEditDelay = 250; WHAMDelay = 500; WHAMDeleteReason = 'Cleanup'; window.AutoCreateUserPagesConfig = { content: { 2: ,       3: ,        1202: ''    },    summary: 'Automatic' }; window.customCodeQuickLinks= { replaceAllDefaultLinks: false, linkSet: { userFiles: [ {               name: 'Universal.css', href: '//c.wikia.com/wiki/User:TheGoldenPatrik1/universal.css' },           {                name: 'Sandbox', href: '/wiki/Special:MyPage/Sandbox' },           {                name: 'To Do List', href: '/wiki/User:TheGoldenPatrik1/To Do List' }       ],        siteFiles: [ {               name: 'Themes.css', href: '/wiki/MediaWiki:Themes.css' },           {                name: 'Staff.css', href: '/wiki/MediaWiki:Staff.css' },           {                name: 'ProfileTags', href: '/wiki/MediaWiki:ProfileTags' }       ],    } }; window.AjaxThreadDeleteConfig = { fastDelete: true, reason: 'Cleanup' }; window.AjaxDelete = { autoCheckWatch: false, };//End Configurations */ /***********************************************************************/ /******************************* Imports *******************************/ /***********************************************************************/ /* GeneralImports */ importArticles({   type: 'script',    articles: [        'u:community:User:TyA/AutoEditDropdown.js',        'u:dev:AjaxBatchDelete/code.2.js',        'u:dev:AjaxDelete/code.js',        'u:dev:AjaxThreadDelete/code.js',        'u:dev:AjaxUndo/code.js',        'u:dev:AnchoredRollback/code.js',        'u:dev:BlogLink/code.js',        'u:dev:CodeQuickLinks/code.js',        'u:dev:EditConflictAlert/code.js',        'u:dev:FindAndReplace/code.js',        'u:dev:GlobalEditcount/code.js',        'u:dev:MassCategorization/code.js',        'u:dev:MassEdit/code.js',        'u:dev:MassNullEdit/code.js',        'u:dev:MassProtect/code.js',        'u:dev:MastheadGender/code.js',        'u:dev:PortableCSSPad/code.js',        'u:dev:QuickDiff/code.js',        'u:dev:SeeMoreActivityButton/code.js',        'u:dev:ShowUserGroups.js',        'u:dev:UnhideUserMasthead/code.js',        'u:dev:ViewDeleted/code.js', 'u:dev:VSTFReport.js', 'u:dev:WallGreetingButton/code.js', 'u:dev:WHAM/code.2.js', 'u:dev:Wikimarks/code.js', 'u:dev:WLHEditLinks/code.js', 'u:kocka:User:KockaAdmiralac/AutoCreateUserPages.javascript', 'u:thegoldenpatrik1:User:TheGoldenPatrik1/CHD.javascript' ] });//End GI */

/* WikiSpecificImports */ if (['193260', '65099'].indexOf(config.wgCityId) !== -1) { importArticles({       type: 'style',        articles: [            'u:dev:MediaWiki:FANSUN.css',            'u:dev:MediaWiki:NORD.css'        ]    }, {        type: 'script',        articles: [            'u:dev:FANSUN.js'        ]    }); }//End WSI */