User:Hypercane/global.js

/****** All of the code I have in this page go to their respective owners, I own none of them. ******/

/* Talk Page Notifications */ window.talkWikis = ['hypotheticalweather','hypotheticalhurricanes','hypothetical-events']; window.talkName = 'talk'; window.topLevelCat = 'Browse'; batchDeleteDelay = massCategorizationDelay = massProtectDelay = nullEditDelay = 10; window.AjaxCommentDeleteConfig = { fastDelete: 'Deleting comment' }; window.ImageNotificationConfig = { refreshInterval: 1000000, enableOn: ['Special:BlankPage/Images'] }; window.YoutubePlayerDisableAutoplay = true; window.globalLinks = { global: { 'User': 'Special:Mypage', 'Talk': 'Special:Mytalk', 'Prefs': 'Special:Preferences', 'Admins': 'Special:ListUsers/sysop', 'Bcrats': 'Special:ListUsers/bureaucrat', 'Contribs': 'Special:MyContributions', 'Purge': '%page%?action=purge', 'QQX': '%page%?uselang=qqx', 'Raw': '%page%?action=raw', 'Log': 'Special:Log', 'Index': 'Special:PrefixIndex' },   hypotheticalhurricanes: { 'AL': 'Special:AbuseLog', 'AF': 'Special:AbuseFilter', 'CHAT': 'Special:Chat' } }; window.AjaxBlock = { blockReasons: { 'Vandalism': 'Vandalism', 'Spam': 'Spam', 'Terms of Use violation': 'ToU', 'Abusing multiple accounts': 'Sock', 'Intimidating behaviour/harassment': 'Harassment', 'Unacceptable username': 'Username', 'Creating unnecessary pages': 'Pages', 'Flooding comments/threads': 'Flood', 'Uploading unnecessary images': 'Images' } }; window.AjaxDelete = { deleteReasons: { 'Help:Vandalism': 'Vandalism', 'Help:Spam': 'Spam', 'Marked for deletion': '{' + '{delete}}', 'Copyright violation': 'Copyright violation', 'Author request': 'Author request', 'Unused': 'Unused', },   imageDeleteReasons: { 'Unused photo/video': 'Unused', 'Help:Vandalism': 'Vandalism', 'Help:Spam': 'Spam', 'Marked for deletion': '{' + '{delete}}', 'Bad quality': 'Quality', 'Duplicated/superseded file': 'Duplicate', 'Unrelated to the wiki topic': 'Not HHW', },   autoCheckWatch: false }; var regularList = [ 'u:admintools:MediaWiki:Common.js/Maintenance.js', 'u:dev:MediaWiki:AjaxUndo/code.js', 'u:dev:MediaWiki:AnchoredRollback/code.js', 'u:dev:MediaWiki:ListFiles/code.js', 'u:dev:MediaWiki:AntiSoundcloud/code.js', 'u:dev:MediaWiki:CacheCheck/code.js', 'u:dev:MediaWiki:DiscussionsFeed.js', 'u:dev:MediaWiki:GlobalEditcount/code.js', 'u:dev:MediaWiki:MassNullEdit/code.js', 'u:dev:MediaWiki:NullEditButton/code.js', 'u:dev:MediaWiki:OldFilePages/code.js', 'u:dev:MediaWiki:QuickDiff/code.js', 'u:dev:MediaWiki:Rollback/code.js', 'u:dev:MediaWiki:WorkingMoreUsersCount.js', 'u:dev:MediaWiki:PortableCSSPad/code.js', 'u:dev:MediaWiki:ToggleSideBar/code.js', 'u:dev:Mediawiki:UserTalkNotifications/code.js', 'u:dev:MediaWiki:WallGreetingButton/code.js', 'u:kocka:User:KockaAdmiralac/EmptyDeleteReason.javascript', 'u:kocka:User:KockaAdmiralac/TorusAutoFullscreen.javascript', 'u:kocka:User:KockaAdmiralac/UnhideUserWikis.javascript', 'u:kocka:User:KockaAdmiralac/GlobalNavModifications.javascript', 'u:kocka:User:KockaAdmiralac/WikiActivityIsForNubs.javascript', 'u:starmanw:MediaWiki:QuickLogs/code.js' ], cmList = [ 'u:dev:MediaWiki:AjaxBatchDelete/code.2.js', 'u:dev:MediaWiki:AjaxDelete/code.js', 'u:dev:MediaWiki:FastOldImageDelete/code.js', 'u:dev:MediaWiki:MassProtect/code.js', 'u:dev:MediaWiki:WHAM/code.2.js', 'u:kocka:MediaWiki:AjaxThreadDelete/code.js', 'u:kocka:MediaWiki:MessageWallActions/code.js' ], adminList = [ 'u:dev:MediaWiki:AjaxBlock/code.js', 'u:dev:MediaWiki:AjaxPatrol/code.js', 'u:dev:MediaWiki:MassCategorization/code.js', 'u:kocka:MediaWiki:AjaxCommentDelete/code.js', 'u:kocka:User:KockaAdmiralac/PatrolAll.javascript', 'u:dev:MediaWiki:MassRedirect/code.1.js', 'u:dev:MediaWiki:MassRename/code.js', 'u:dev:MediaWiki:MassRenameRevert/code.js' ]; $(function {   // Move the toggle button on CC    if(mw.config.get('wgCityId') === 177) {        var togglemove = setInterval(function { if($('#ToggleSideBarButton').length > 0) { clearInterval(togglemove); $('#ToggleSideBarButton').insertAfter('.header-tally .tally'); }       }, 100);    }    // Clean up my title    document.title = document.title.split(' | ')[0];    // Show user registration date in masthead    mw.loader.using('mediawiki.api').then(function { if($('#UserProfileMasthead').length === 0) { return; }       var reg, load; new mw.Api.get({           action: 'query',            list: 'users',            ususers: $("#UserProfileMasthead h1").text,            usprop: 'registration'        }).done(function(d) {            if(d.query.users) {                reg = new Date(d.query.users[0].registration).toLocaleString;                if(load) {                    cb;                }            }        }); var regInt = setInterval(function {           if($('.globaledit-label').length > 0) {                clearInterval(regInt);                load = true;                if(reg) {                    cb;                }            }        }, 100); function cb { $('.globaledit-label').html($('.globaledit-label').html + ' ' + reg); }   });    // Automatically remove "favorite wikis" (Thanks KockaAdmiralac)    $.nirvana.getJson('UserProfilePage', 'renderUserIdentityBox', function(d) { var user = d.user; user.topWikis.forEach(function(el) {           $.nirvana.postJson('UserProfilePage', 'onHideWiki', { userId: user.id, wikiId: el.id           });        }, this); }); }); importArticles({   type: 'script',    articles: regularList        .concat((wgUserGroups.includes('sysop') ? adminList.concat(cmList) : []))        .concat((wgUserGroups.includes('content-moderator') ? cmList : [])) });

/* Global Chat JS */ importArticles({   type: 'script',    articles: [        'u:dev:GlobalChatJS.js',    ] });