User:JPhil2.0/global.js

/* =========================================================================    JS for monobook and oasis applied to all wikia wikis. @author JPhil2.0 ========================================================================== */ importScriptPage('CapsFirst/code.js', 'dev'); importScriptPage('WHAM/code.2.js', 'dev'); importScriptPage('PortableCSSPad/code.js', 'dev'); importScriptPage('HeaderLinks/code.js', 'dev'); importScriptPage('View_Source/code.js', 'dev'); importScriptPage('RevealAnonIP/usercode.js', 'dev' ); importScriptPage('User:Wildream/SoundNotifications.js', 'ru.community'); importScriptPage('User:Wildream/ChatQuote/code.js', 'ru.community'); importScriptPage('CategoryRenameAuto-update/code.js', 'dev'); importScriptPage('FileUsageAuto-update/code.js', 'dev'); importScriptPage('MassCategorization/code.js', 'dev'); importScriptPage('NoImageLightbox/code.js', 'dev'); importScriptPage('User:Monchoman45/ChatHacks.js', 'c'); importScriptPage('ViewRemoved/code.js', 'dev'); importScriptPage('User:Ozuzanna/chatconnect.js', 'c'); $.getScript('https://raw.github.com/sactage/wikia-js-snippets/master/ChatOptions.js');

var c = mw.config.get( [   'wgArticlePath',    'wgPageName',    'wgCanonicalSpecialPageName',    'wgTitle',    'wgAction',    'wgCanonicalNamespace',    'wgNamespaceNumber',    'wgUserGroups',    'wgSiteName',    'skin' ] ), tempArray, escapedPage = encodeURIComponent(c.wgPageName);
 * (function($, mw) {

/* AjaxRC Customization */ if (mw.config.get('wgCanonicalSpecialPageName') == 'WikiActivity') { mw.util.addCSS(       '#ajaxRefresh {' +            'position: absolute;' +            'right: 0;' +            'bottom: 10px;' +        '}' +        '#ajaxLoadProgress {' +            'margin-left:5px;' +        '}'    ); } window.ajaxRefresh = 30000; window.ajaxPages = ["Special:RecentChanges","Special:Watchlist","Special:Log","Special:Contributions"]; importScriptPage('AjaxRC/code.js', 'dev');

/* QuickCreateUserPage Customization */ var qtUserPageTemplate = ""; var qtEnableUserPageOverwrite = true; importScriptPage('QuickCreateUserPage/code.js', 'dev');

/* Custom Account Navigation */ $(function { $('Contributions').insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('Global.css').insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('Global.js').insertBefore('.AccountNavigation .subnav li:first'); });

/* Masthead modifications */ if ($("#UserProfileMasthead").size) $("#UserProfileMasthead .tally em").wrap($("").attr("href", "/Special:Editcount/"+$("#UserProfileMasthead h1[itemprop=name]").html));

/* Wiki Activity to Recent Changes */ $('[data-canonical="wikiactivity"]') .attr('href', '/wiki/Special:RecentChanges') .html('Recent Changes');

/* IP lookup on contribs */ if (c.wgCanonicalSpecialPageName == "Contributions" && $('#anontalktext').length && c.wgTitle.split('.').length == 4) $('.masthead-info h2').html('(lookup)'); /* InactiveUsers Customization */ InactiveUsers = { months: 1 }; importScriptPage('InactiveUsers/code.js', 'dev');

/* Thread modifications @author 452 */ if ((wgNamespaceNumber == 1201) && !$(".msg-title a").text) { $("ul.replies").prepend("<h1 class='center'><a href="+$(".msg-title a").attr("href")+">Link to parent thread</a> </li>"); } if ($(".replies .SpeechBubble.message").length) $(".replies .SpeechBubble.message").each(function{ $(".timestamp", this).append("(<a href='./Thread:"+$(this).attr("data-id")+"'>link</a>)"); });

/* Toolbar modifications */ if ($('.toolbar > .tools').length) { $('.toolbar > .tools > li:last').after(   $('').append('<a href="/index.php?title='+escapedPage+'&useskin=monobook">Monobook</a>'),    $('').append('<a href="/index.php?title='+escapedPage+'&useskin=wikiamobile">Mobile</a>'),        $('').append('<a href="/index.php?title='+escapedPage+'&useskin=venus">Venus</a>'),    $('').append('<a href="/index.php?title='+escapedPage+'&allowuserjs=0">No User JS</a>'),    $('').append('<a href="/index.php?title='+escapedPage+'&allowusercss=0">No User CSS</a>'),    $('').append('<a href="/index.php?title='+escapedPage+'&usesitejs=0">No Site JS</a>'),    $('').append('<a href="/index.php?title='+escapedPage+'&usesitecss=0">No Site CSS</a>')  ); }

}) (this.jQuery, this.mediaWiki);