User:UltimateSupreme/global.js

jQuery(function($) {       $(' Recent Changes').insertAfter("#WikiHeader .buttons .wikia-button[data-id=wikiactivity]").before(' ');    }); }

/* */

/* Auto updating recent changes opt-in * See w:c:dev:AjaxRC for info & attribution */

AjaxRCRefreshText = 'Auto-refresh'; AjaxRCRefreshHoverText = 'Automatically refresh the page'; importScriptPage('AjaxRC/code.js', 'dev');

/* Custom edit buttons * Original by User:Grunny */

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/7/73/Button_code_nowiki.png?1", "speedTip": "code+nowiki", "tagOpen": " ", "sampleText": "Insert code here"};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/2/29/Button_user.png?1", "speedTip": "Global user template", "tagOpen": "", "tagClose": "", "sampleText": ""};

/* Add stuff to user menu */

function UserContribsMenuItem { $('ul.AccountNavigation li:first-child ul.subnav li:first-child').after('Contributions'); } addOnloadHook(UserContribsMenuItem);

function FollowingMenuItem { $('ul.AccountNavigation li:first-child ul.subnav li:first-child').after('Followed pages'); } addOnloadHook(FollowingMenuItem);

/* */

importScriptPage('FixWantedFiles/code.js', 'dev'); importScriptPage('PurgeButton/code.js', 'dev' ); importScriptPage( 'InactiveUsers/code.js', 'dev' ) ; importScriptPage( 'AjaxBatchDelete/code.js', 'dev' ) ; /** * Kill image lightbox by User:Mathmagician, 6 August 2012 * http://community.wikia.com/wiki/User:Mathmagician/killImageLightbox.js * - Kills image lightbox so that clicking an image takes you to the File: * - Videos use the same LightboxLoader.handleClick method that images do, *    so if that method is deleted, then videos can no longer be played, *    but this version uses a trick/hack to make sure that if a video is *     clicked, then the LightboxLoader.handleClick is still called properly */ $(function {    if ("oasis" != skin && "wikia" != skin) return;

var clickedVideo = false;

function killImageLightbox { // hack to not kill lightbox for videos if (window.LightboxLoader && !LightboxLoader.handleClickOverride) { LightboxLoader.handleClickOverride = LightboxLoader.handleClick; LightboxLoader.handleClick = function { if (clickedVideo) { clickedVideo = false; LightboxLoader.handleClickOverride.apply(this, arguments); }           };        }    }    // playing it safe... killImageLightbox; setTimeout(killImageLightbox, 2000); setTimeout(killImageLightbox, 5000); setTimeout(killImageLightbox, 8000);

// hack to not kill lightbox for videos $('a[data-video-name]').click(function {        clickedVideo = true;        console.log('clickedVideo == true');    }); // href to File: page $('a[data-image-name]') .each(function {        var $this = $(this);        var e = encodeURIComponent($this.attr('data-image-name').replace(/ /g, '_'));        $this.attr('href', '/wiki/File:' + e);    }); });