MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */ // ============================================================ // displayTimer // ============================================================ var refreshDate; function addDate { var UTCDate = ((new Date).toUTCString).replace("GMT", "(UTC)"); $('#showdate').empty.append(' ' + UTCDate.substring(5) + ' '); window.clearTimeout(refreshDate); refreshDate = window.setTimeout(addDate, 1000); } $(document).ready(function {   if (skin == 'oasis')         $(' ').appendTo('#GlobalNavigation');    else        $('#p-personal ul').prepend(' ');    addDate;    refreshDate = window.setTimeout(addDate, 1000);    $('#displayTimer').css({'font-size': "12px"}); }); //

/* Auto Refresh */ AjaxRCRefreshText = 'Auto-refresh'; AjaxRCRefreshHoverText = 'Automatically refresh the page'; ajaxPages = ["Special:RecentChanges","Special:WikiActivity"]; importScriptPage('AjaxRC/code.js', 'dev');

/* Countdown */ $(function{	importArticles({ type: "script", articles: ["u:zh.pad.wikia.com:MediaWiki:CountDown.js"] }, {		type: "style", articles: ["u:zh.pad.wikia.com:MediaWiki:CountDown.css"] }); });

/* Imports */ importArticles({   type: "script",    articles: [        // Countdown long dates        "w:c:dev:Countdown/code.js",        // Back to top button        "w:c:dev:BackToTopButton/code.js"    ] });

/* SearchSuggest */ importArticles({   type: 'script',    articles: [        'u:dev:SearchSuggest/code.js'    ] });

// Adding "My Contributions" to user menu. // Function: Adds "My Contributions" to the UserDropdownMenu. function UserContribsMenuItem { $('ul.AccountNavigation li:first-child ul.subnav li:first-child').after('My Contributions'); } addOnloadHook(UserContribsMenuItem); function onloadhookcustom { var replace = document.getElementById("OnlineChat"); if (null != replace) { var getvalue = replace.getAttribute("class"); } } // Credit to Runescape Wiki //Chat Header Text. importScriptPage('MediaWiki:Chat.js/options.js','cod');

var chatTopic = 'Welcome to the chat of The Football Database Wiki' $(function {	$('#ChatHeader .public.wordmark').prepend(''+chatTopic+' ')	.find('a').attr('style','position:relative;text-decoration:underline;') }) $('#ChatHeader .public.wordmark div:not(:first-child)').remove

/* Wiki Notification */ function addPageBottom { $("#WikiaRail").append('The 2014 FIFA World Cup is this year! Want to learn more about it? '); } $(addPageBottom);