User:Ultimate Dark Carnage/wikia.js

(function($, mw){   if (mw.config.get('skin') == "oasis" || mw.config.get('skin') == "wikia" || mw.config.get('skin') == "venus"){        var clock_style =             '.clock-container {' +                '\npadding-left: 10px;' +                 '\n}' +             '\n.clock-container .clock {' +                 '\ncolor: black;' +            '\n}';        function addZero(i){            if (i < 10) i = "0" + i;            return i;        }        if ($('.global-navigation').length && !$('.clock-container').length){            $('.global-navigation > .page-width').append($(' ', {                "class": "clock-container table-cell",                html: ''            }));            $('head').append('' + clock_style + ' ');            setInterval(function{ var d;               if (new Date){ d = new Date; $('.clock-container .clock').html(addZero(d.getHours) + ':' + addZero(d.getMinutes) + ':' + addZero(d.getSeconds)); }           }, 1000);        }    } })(jQuery, mediaWiki);

function getBrowserName(name){ var browserName; if (name){ switch (name){ case 'MSIE': browserName = 'Internet Explorer'; break; case 'Firefox': browserName = 'Mozilla Firefox'; break; case 'Chrome': browserName = 'Google Chrome'; break; default: browserName = name; }           return browserName; } } function getBrowserVersion(value){ if (value > -1){ value = parseInt(value, 10); return value; } } var browser = getBrowserName(navigator.info[0]), version = getBrowserVersion(navigator.info[1]); $('.WikiaPageHeader .tally').after(   $(' ', { "class": "browser-name", html: 'You are using' + browser + ' ' + version + '!' }) );