User:TheGoldenPatrik1/global.js

/***********************************************************************/ /***************************** Doc and Toc *****************************/ /***********************************************************************/ /* DOCUMENTATION * @Author  TheGoldenPatrik1 * @Purpose Scripts imported for global use * @Protect */ /* 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'; //End Variables */

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

/* 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) {

/* SignatureButton | By Josephyr */ if (wgAction == 'edit' || wgAction == 'publish') { if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { 'speedTip': 'Signature', 'tagOpen': '' };   } }//End SB */

/***********************************************************************/ /**************************** 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 = { deleteReasons: { 'Spam': 'Spam', 'Cleanup': 'Cleanup', 'Marked for deletion': 'MFD', 'Housekeeping': 'Housekeeping' },   imageDeleteReasons: { 'Spam': 'Spam', 'Unused': 'Unused', 'Housekeeping': 'Housekeeping', 'Cleanup': 'Cleanup' },   autoCheckWatch: false }; window.announcementsIgnore = { option: 'opt-out-all', exceptWikiIds: [ 177,       1399015,        1542998    ] };//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:AnnouncementsIgnore.js',        'u:dev:BlogLink/code.js',        'u:dev:CodeQuickLinks/code.js',        'u:dev:DiscussionsViewer.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 */