User:JustLeafy/global.js

//__NOWYSIWYG__ /* Imports */ importArticles({   type: 'script',    articles: [        'u:dev:AjaxDelete/code.js',        'u:dev:AjaxBatchDelete.js',        'u:dev:AjaxUndo/code.js',        'u:dev:BlogLink/code.js',        'u:dev:CategoryQuickRemove.js',        'u:dev:CommentPreview/code.js',        'u:dev:ConsistentModules/code.js',        'u:dev:DisableInfoboxBuilder.js',        'u:dev:EditBio/code.js',        'u:dev:EditConflictAlert/code.js',        'u:dev:FindAndReplace/code.js',        'u:dev:GalleryCaptions/code.js',        'u:dev:ManageReferences/code.js',        'u:dev:MassBlock/code.js',        'u:dev:MassEdit/code.js',        'u:dev:MobileEditor.js',        'u:dev:ModernLightbox.js',        'u:dev:ModernProfile/EditButton.js',        'u:dev:MoveSubcategoriesToTheTop.js',        'u:dev:MultiUpload/code.js',        'u:dev:Nuke/code.js',        'u:dev:NullEditButton/code.js',        'u:dev:PortableCSSPad/code.js', 'u:dev:PurgeButton/code.js', 'u:dev:QQX/code.js', 'u:dev:RandomPageShortcut/code.js', 'u:dev:RedirectManagement/code.js', 'u:dev:RevealAnonIP/code.js', 'u:dev:SandboxLink/code.js', 'u:dev:SandboxTab/code.js', 'u:dev:SavedDrafts.js', 'u:dev:SeeMoreActivityButton/code.js', 'u:dev:Sine/code.js', 'u:dev:UserActivityTab/code.js', 'u:dev:UserUnusedFiles.js', 'u:dev:View Source/code.js', 'u:dev:VSTFReport.js', 'u:dev:WallGreetingButton/code.js', 'u:dev:WHAM/code.2.js' ] });

//RemoveBlueOutline /* It basically removes unnecessary blue outlines except when tabbing */

importArticles({   type: 'style',    articles: [        'u:dev:RemoveBlueOutline.css'    ] }); function handleFirstTab(e) { if (e.keyCode === 9) { // the "I am a keyboard user" key document.body.classList.add('user-is-tabbing'); window.removeEventListener('keydown', handleFirstTab); } }

window.addEventListener('keydown', handleFirstTab);

var didScroll; var lastScrollTop = 0; var delta = 5; var navbarHeight = $('div#globalNavigation').outerHeight; $(window).scroll(function(event){   didScroll = true; }); setInterval(function {   if (didScroll) {        hasScrolled;        didScroll = false;    } }, 250); function hasScrolled { var st = $(this).scrollTop; if(Math.abs(lastScrollTop - st) <= delta) return; if (st > lastScrollTop && st > navbarHeight){ $('div#globalNavigation').removeClass('wds-global-navigation').addClass('wds-global-navigation-up'); } else { if(st + $(window).height < $(document).height) { $('div#globalNavigation').removeClass('wds-global-navigation-up').addClass('wds-global-navigation'); }   }    lastScrollTop = st; }

if (mw.config.get("wgUserGroups").indexOf('sysop') > -1) { window.massCategorizationDelay = 1000; importArticle({       type: 'script',        article: 'u:dev:MediaWiki:MassCategorization/code.js'    }); }

if (typeof(namespaceNotifyWiki) == "undefined") {    var namespaceNotifyWiki = 'vstf'; } if (typeof(namespaceNotifyNamespace) == "undefined") {     var namespaceNotifyNamespace = 114; } if (typeof(namespaceNotifyScriptLocation) == "undefined") {     var namespaceNotifyScriptLocation = "ul.tools"; }   function pagesUpdate {       $('head').append(''); }   function getData(dis){     $('#NamespaceNotify').html('' + dis.query.recentchanges[0].user + ' changed ' + dis.query.recentchanges[0].title + '')   };   $(document).ready(function{     if (mw.config.get('skin') == "oasis") {         $(namespaceNotifyScriptLocation).append('');         $('head').append('a#NSNotifyLink:visited {color:#77F !important;} ');     } else if (mw.config.get('skin') == "monobook") {         $('#p-personal .pBody ul:first-child').prepend('');         $('head').append('#p-personal li a#NSNotifyLink {color:#F00 !important;} #p-personal li a#NSNotifyLink:visited {color:#77F !important;} ');     }           pagesUpdate; })