User:Jonny Manz/global.js

//Various functions var ajaxPages = ["Special:RecentChanges","Special:Watchlist","Special:Log","Special:Contributions","Special:WikiActivity"]; var ajaxindicator = 'http://images2.wikia.nocookie.net/__cb20100609110347/software/images/a/a9/Indicator.gif'; var AjaxRCRefreshText = 'Auto-Refresh';

window.NoImageLightbox = { novideo: true }; importArticles({   type: 'script',    articles: [        'u:dev:RevealAnonIP/usercode.js',        'u:foodtest:MediaWiki:FindProfanity.js',        'u:dev:AjaxRC/code.js',        'u:dev:CacheCheck/code.js',        'u:dev:NoImageLightbox/code.js'    ] });

// ******************* // Custom edit buttons // ******************* if (wgAction == "edit" || wgAction == "submit") { /***** Custom edit buttons *****/ if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/__cb20100502153339/callofduty/images/1/17/Button_Ssig.jpg", "speedTip": "My custom signature, including date and timestamp", "tagOpen": "--", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/c/c8/Button_redirect.png", "speedTip": "Redirect", "tagOpen": "#redirect",               "tagClose": "", "sampleText": "PAGE"}; } }

//Disable Special:Upload pop-up (without needing to open in a new tab) //Credit to User:Bobogoobo $(document).ready(function {   if (mw.config.get('wgCanonicalSpecialPageName') === 'AdminDashboard') {        $('li[data-modal="AddPhoto"]').on('click', function { window.location.href = $(this).children('a:first').attr('href'); });    } });

// Unchecks redirects when moving files if (wgPageName.indexOf("Special:MovePage/File:") != -1) { $('input#wpLeaveRedirect').removeAttr('checked'); }

//Floating video watching (thanks to Wildream, I assume) $(function {    var startOffset = $('.floating-infobox').offset.top;    $(window).scroll(function  { var topScroll = $(document).scrollTop, infoboxHeight = $('.floating-infobox').children.height, footerOffset = $('#WikiaArticleCategories').offset.top - 10; if ($('#stop-floating').length) { footerOffset = $('#stop-floating').offset.top - 10; }       if (topScroll > startOffset && topScroll < footerOffset - infoboxHeight) { $('.floating-infobox').offset({               top: topScroll            }); }   }); });