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'    ]); //End Variables */

/* 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'; WHAMBlockReason = 'Vandalism'; AutoCreateUserPagesConfig = { content: { 2: ,       3: ,        1202: ''    },    summary: 'Automatic' }; 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' }       ],    } }; AjaxThreadDeleteConfig = { fastDelete: true, reason: 'Cleanup' }; AjaxDelete = { deleteReasons: { 'Spam': 'Spam', 'Cleanup': 'Cleanup', 'Marked for deletion': 'MFD', 'Housekeeping': 'Housekeeping' },   imageDeleteReasons: { 'Spam': 'Spam', 'Unused': 'Unused', 'Housekeeping': 'Housekeeping', 'Cleanup': 'Cleanup' },   autoCheckWatch: false }; announcementsIgnore = { option: 'opt-out-all', exceptWikiIds: [ 177,       1399015,        1542998    ] }; globalNavButtons = [ //Debug {   text: 'Debug', url: new mw.Uri.extend({debug: '1'}).toString, isMain: true, whoIsMain: false, shortName: 'd' }, { text: 'Site JS', url: new mw.Uri.extend({usesitejs: '0'}).toString, isMain: false, whoIsMain: 'd', shortName: 's-js' }, {   text: 'User JS', url: new mw.Uri.extend({useuserjs: '0'}).toString, isMain: false, whoIsMain: 'd', shortName: 'u-js' }, {   text: 'Site CSS', url: new mw.Uri.extend({usesitecss: '0'}).toString, isMain: false, whoIsMain: 'd', shortName: 's-css' }, {   text: 'User CSS', url: new mw.Uri.extend({useusercss: '0'}).toString, isMain: false, whoIsMain: 'd', shortName: 'u-css' }, {   text: 'All JS', url: new mw.Uri.extend({usesitejs: '0'}).toString+'&useuserjs=0', isMain: false, whoIsMain: 'd', shortName: 'a-js' }, {   text: 'All CSS', url: new mw.Uri.extend({usesitecss: '0'}).toString+'&useusercss=0', isMain: false, whoIsMain: 'd', shortName: 'a-css' }, {   text: 'Everything', url: new mw.Uri.extend({usesitejs: '0'}).toString+'&useuserjs=0&useusercss=0&usesitecss=0', isMain: false, whoIsMain: 'd', shortName: 'eve' }, //Actions {   text: 'Purge', url: new mw.Uri.extend({action: 'purge'}).toString, isMain: true, whoIsMain: false, shortName: 'a' }, { text: 'Raw', url: new mw.Uri.extend({action: 'raw'}).toString, isMain: false, whoIsMain: 'a', shortName: 'a-r' }, {   text: 'QQX', url: new mw.Uri.extend({uselang: 'qqx'}).toString, isMain: false, whoIsMain: 'a', shortName: 'a-qqx' }, //Pages {   text: 'Pages', url: '/wiki/Special:AllPages', isMain: true, whoIsMain: false, shortName: 'p' }, { text: 'RC', url: '/wiki/Special:Recentchanges', isMain: false, whoIsMain: 'p', shortName: 'rc' }, {   text: 'Prefindex', url: '/wiki/Special:PrefixIndex', isMain: false, whoIsMain: 'p', shortName: 'pref' }, {   text: 'Test-Code', url: '//thegoldenpatrik1.wikia.com/wiki/User:TheGoldenPatrik1/common.js', isMain: false, whoIsMain: 'p', shortName: 't-c' }, {   text: 'Test-Misc', url: '//thegoldenpatrik1.wikia.com/wiki/Special:RandomInCategory/Test_Pages', isMain: false, whoIsMain: 'p', shortName: 't-m' }, //Contact {   text: 'SC', url: '/wiki/Special:Contact/general', isMain: true, whoIsMain: false, shortName: 'c' }, { text: 'S:C/bug', url: '/wiki/Special:Contact/bug', isMain: false, whoIsMain: 'c', shortName: 'c-b' }, {   text: 'S:C/feedback', url: '/wiki/Special:Contact/feedback', isMain: false, whoIsMain: 'c', shortName: 'c-f' }, {   text: 'S:C/close-wiki', url: '/wiki/Special:Contact/close-wiki', isMain: false, whoIsMain: 'c', shortName: 's-w' }, //Logs {   text: 'Logs', url: '/wiki/Special:Log', isMain: true, whoIsMain: false, shortName: 'l' }, { text: 'URL', url: '/wiki/Special:Log/rights', isMain: false, whoIsMain: 'l', shortName: 'url' }, {   text: 'DL', url: '/wiki/Special:Log/delete', isMain: false, whoIsMain: 'l', shortName: 'dl' }, {   text: 'PL', url: '/wiki/Special:Log/protect', isMain: false, whoIsMain: 'l', shortName: 'pl' }, {   text: 'BL', url: '/wiki/Special:Log/block', isMain: false, whoIsMain: 'l', shortName: 'bl' }, {   text: 'CC URL', url: '//community.wikia.com/wiki/Special:Log/rights', isMain: false, whoIsMain: 'l', shortName: 'cc-url' }, {   text: 'Admins', url: '/wiki/Special:ListAdmins', isMain: false, whoIsMain: 'l', shortName: 'la' }, //VSTF {   text: 'VSTF', url: '//vstf.wikia.com/wiki/Special:Recentchanges', isMain: true, whoIsMain: false, shortName: 'v' }, { text: 'Spam', url: '//vstf.wikia.com/wiki/Report:Spam', isMain: false, whoIsMain: 'v', shortName: 'v-s' }, {   text: 'Vandalism', url: '//vstf.wikia.com/wiki/Report:Vandalism', isMain: false, whoIsMain: 'v', shortName: 'v-v' }, {   text: 'Profiles', url: '//vstf.wikia.com/wiki/Report:User_profile_headers', isMain: false, whoIsMain: 'v', shortName: 'v-p' }, {   text: 'Wikis', url: '//vstf.wikia.com/wiki/Report:Wiki', isMain: false, whoIsMain: 'v', shortName: 'v-w' }, {   text: 'Biglist', url: '//vstf.wikia.com/wiki/Report:Spam/Biglist', isMain: false, whoIsMain: 'v', shortName: 'v-b' }];//End Configurations */ /***********************************************************************/ /******************************* Imports *******************************/ /***********************************************************************/ /* GeneralImports */ importArticles({   type: 'script',    articles: [        'u:community:User:TyA/AutoEditDropdown.js',        'u:dev:AjaxBatchDelete.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:EditConflictAlert/code.js',        'u:dev:FileLogs.js',        'u:dev:FindAndReplace/code.js',        'u:dev:GlobalEditcount/code.js',        'u:dev:GlobalNavButtons.js',        'u:dev:LinkToDiscussionsProfileIfTheyDontHaveLivePosts/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:UserAccountAge/code2.js', 'u:dev:VanguardTools.js', 'u:dev:ViewDeleted/code.js', 'u:dev:VSTFReport.js', 'u:dev:WallGreetingButton/code.js', 'u:dev:WHAM/code.2.js', 'u:dev:WLHEditLinks/code.js', 'u:kocka:User:KockaAdmiralac/AutoCreateUserPages.javascript', //'u:thegoldenpatrik1:MarkForDeletion.js' ] });//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 */