MediaWiki:Wikia.js/MainPage.js

(function($, mw){   var mwConfig = {        "page": mw.config.get('wgPageName'),        "skin": mw.config.get('skin'),        "username": mw.config.get('wgUserName'),        "namespace": (function(ns){ "use strict"; var namespace = null; ns = (ns) ? Number(ns) : NaN; if (isNaN(ns) === false){ switch (ns){ case -2: namespace = "Media"; break; case -1: namespace = "Special"; break; case 0: namespace = "Main"; break; case 1: namespace = "Talk"; break; case 2: namespace = "User"; break; }           }            return namespace; })(mw.config.get('wgNamespaceNumber')),   };    if (mwConfig["page"].indexOf('Main Page') > -1 || mwConfig["page"].indexOf('HTML & CSS Wiki') > -1){        var mainPage = {            lcs: {                content: {},                fn: {}            },            rcs: {                content: {},                fn: {}            },            ui: {}        }, html;        mainPage.ui.content = function(html, id){            if (html){                html = '' + html + ' ';           }            return html;        };        mainPage.ui.browsers = (function{ var html = null, browsers = ["IE", "FF", "Chrome", "Safari", "Opera"]; html = '' + '' + ''; for (var i = 0; i < browsers.length; i++){ var browserName = (browsers[i] == "IE") ? 'Internet Explorer' : ((browsers[i] == "FF") ? 'Firefox' : ((browsers[i] == "Chrome") ? 'Google Chrome' : browsers[i])); $.get('/wiki/File:' + browsers[i] + 'logo.svg', function(data){                   var page = $(data),                        image_cont = page.find('.fullImageLink')[0],                        image = image_cont.find('img').attr('src');                    html += ' ' + browserName + ' ';                }); }           html += '  '; return html; });       if (mainPage.lcs.content){            mainPage.lcs.content["Banner"] = {                header: false,                html: (function{ })           };            mainPage.lcs.content["Article Count"] = {                header: false,                html:             };            mainPage.lcs.content["Navigation"] = {                header: true,                html:             };        }    } })(this.jQuery, this.mediaWiki);