User:Ultimate Dark Carnage/global.js

cacheSkip = []; cacheSkipLimit = 1000;

importScriptPage('User:Monchoman45/ChatHacks.js', 'c'); importScriptPage('MessageBlocker/code.js', 'dev');

importArticles({   type: 'script',    articles: [        'u:dev:NullEditButton/code.js',        'u:dev:AntiUnicruft/code.js',        'u:dev:BackToTopButton/code.js',        'u:dev:PortableCSSPad/code.js',        'u:dev:WHAM/code.js',        'u:dev:QuickModTools/loader.js',        'u:dev:CacheCheck/code.js',        'u:dev:MassNullEdit/code.js'    ] });

var skin = mw.config.get('skin', skin); if (['oasis', 'wikia'].indexOf(skin) === -1) return; var $WikiaRail = $('#WikiaRail'); if ($WikiaRail.hasClass('loaded')){ $WikiaRail.find(['section', 'div'].join(', ')).filter(function{           var cname = 'module',                isModule = $(this).hasClass(cname);            return isModule;        }).removeClass('module').addClass('rail-module'); } else { $WikiaRail.on('DOMNodeInserted', function(event){           if ($(event.target).hasClass('module')){                $(event.target).removeClass('module');                $(event.target).addClass('rail-module');            }        }); } })(this.mediaWiki, this.jQuery);
 * (function(mw, $){

var mwVars = mw.config.get([           'wgServer',            'wgPageName',            'wgNamespaceNumber',            'wgArticlePath'        ]), config = $.extend(module, {           dbName: mwVars.wgServer.replace(/http:\/\/(.*)\.wikia\.com/g, '$1'),            exceptions: ['.new', '.free', '.toc a', '.wikia-button', '.button a', '.wikia-menu-button a'],            links: function{                return $('.mw-content-text a').filter(function{ var isNormalLink = !$(this).is(config.exceptions.join(', ')); return isNormalLink; });           },            isCurrentServer: function(link){                var link_regex = /http:\/\/(.*)\.wikia\.com\/(?:.*)/g,                    link_dbname = link.replace(link_regex, '$1'),                    value = null;                if (link_dbname == config.dbName){                    value = true;                } else {                    value = false;                }                return value;            },            shorten: function(fullurl){                var link_regex = /http:\/\/(.*)\.wikia\.com\/(?:.*)/g;                if (link_regex.test(fullurl))                    return fullurl.replace(wgServer, '');                else                    return fullurl;            },            lengthen: function(url){                var link_regex = /http:\/\/(.*)\.wikia\.com\/(?:.*)/g;                if (link_regex.test(url))                    return url; else return wgServer + url; }       });    $(document).ready(function initialize{ importArticles({ type: 'script', articles: ['MediaWiki:ArticlePreview.css'] }); var $links = config.links; $links.each(function bind{           var link = $(this).attr('href'),                height = $(this).height,                link_l = config.lengthen(link),                varr = /(?:.*)[?&](?:[a-z0-9])=(.*)/g,                ns = ['Template', 'MediaWiki', 'Category', 'Forum'],                nsr = new RegExp('http\:\/\/(?:.*)\.wikia\.com\/wiki\/(' + ns.join('|') + ')\:(?:.*)');            if (varr.test(link) || !config.isCurrentServer(link_l) || nsr.test(link_l)) return;            $(this).on('mouseover', function show(event){ var offset = $(event.target).offset, $preview_wrapper = $(''), $header = $('').text($(event.target).text), $container = $(' '), $more_button = $('').text('See More'), link_s = config.shorten(link_l); $more_button.attr('href', $more_button.attr('href').replace('$link', link_l)); $.ajax({                   method: 'GET',                    dataType: 'json',                    url: mw.util.wikiScript('api'),                    data: {                        page: link_s.replace('/wiki/', ''),                        action: 'parse',                        format: 'json'                    }                }).done(function add_preview(data){                    var code = data.parse.text['*'];                    $container.html(code);                    $preview_wrapper.html([$header, $container, $more_button]).css({ 'left': offset.left + 'px', 'top': (offset.top + height) + 'px' });                   if (!$('#article-preview').exists)                        $('.WikiaSiteWrapper').append($preview_wrapper);                }); });           $(this).on('mouseout', function hide(event){ if ($('#article-preview').exists){ $('#article-preview').remove; }           });        });    }); })(this.mediaWiki, this.jQuery, (window.preview = window.preview || {}));
 * (function(mw, $, module){