User:KockaAdmiralac/global.js

/** * NOTE: Copying anything from here is done on your own risk, however, *      giving credit to the place you copied your code from is required. */ window.topLevelCat = 'Browse'; window.ajaxSpecialPages = ['Recentchanges', 'Log', 'Newwikis', 'AbuseLog']; 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:ListAdmins', 'Contribs': 'Special:MyContributions', 'Purge': '%page%?action=purge', 'QQX': '%page%?uselang=qqx', 'Raw': '%page%?action=raw', 'Log': 'Special:Log', 'Index': 'Special:PrefixIndex' },   community: { 'RC': 'Special:RecentChanges', 'AL': 'Special:AbuseLog', 'NW': 'Special:Newwikis', 'Images': 'Special:BlankPage/UncategorizedFileListing', 'JS': 'Special:Mypage/global.js', 'CSS': 'Special:Mypage/global.css', 'Forum': 'Special:Forum', 'Updates': 'Blog:Wikia Technical Updates', 'Help': 'Special:RandomInCategory/Help', },   undertale: { 'AL': 'Special:AbuseLog', 'AF': 'Special:AbuseFilter' } };

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', 'Housekeeping': 'I\'m too lazy to find a valid reason lol', 'Unused': 'Unused', ':^)': ':^)'   },    imageDeleteReasons: { 'Help:Vandalism': 'Vandalism', 'Help:Spam': 'Spam', 'Marked for deletion': '{' + '{delete}}', 'Unused': 'Unused', 'Bad quality': 'Quality', 'Duplicated/superseded file': 'Duplicate', 'Fanmade content': 'Fanmade content', 'Unrelated to the wiki topic': 'Not Undertale', 'Housekeeping': 'I\'m too lazy to find a valid reason lol', },   autoCheckWatch: false };

var regularList = [ 'u:admintools:MediaWiki:Common.js/Maintenance.js', 'u:dev:MediaWiki:AjaxRC/beta.js', 'u:dev:MediaWiki:AjaxUndo/code.js', 'u:dev:MediaWiki:AnchoredRollback/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:ToggleSideBar/code.js', 'u:dev:MediaWiki:ViewRemovedAlways/code.js', 'u:dev:MediaWiki:WallGreetingButton/code.js', 'u:dev:MediaWiki:YouTubeModal/code.js', 'u:kocka:MediaWiki:UncategorizedFileListing/code.js', 'u:kocka:User:KockaAdmiralac/AutoWideCodeeditor.javascript', 'u:kocka:User:KockaAdmiralac/EmptyDeleteReason.javascript', 'u:kocka:User:KockaAdmiralac/LinkModifications.javascript', 'u:kocka:User:KockaAdmiralac/MastheadGender.javascript', 'u:kocka:User:KockaAdmiralac/PhalanxLul.javascript', 'u:kocka:User:KockaAdmiralac/TorusAutoFullscreen.javascript', 'u:kocka:User:KockaAdmiralac/UnhideUserWikis.javascript', 'u:kocka:User:KockaAdmiralac/WikiActivityIsForNubs.javascript', 'u:kocka:User:KockaAdmiralac/GlobalNavModifications.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' ];

$(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 { 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); }   }); });

importArticles({   type: 'script',    articles: regularList        .concat((wgUserGroups.includes('sysop') ? adminList.concat(cmList) : []))        .concat((wgUserGroups.includes('content-moderator') ? cmList : [])) });