MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */

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

/* Replaces with the name of the user browsing the page. Requires copying Template:USERNAME. */ function UserNameReplace { if(typeof(disableUsernameReplace) != 'undefined' && disableUsernameReplace || wgUserName == null) return; $("span.insertusername").html(wgUserName); } addOnloadHook(UserNameReplace); /* End of the replacement */

// // ============================================================ // 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, 5000); }

$(document).ready(function { if (skin == 'oasis') $(' ').appendTo('#GlobalNavigation'); else $('#p-personal ul').prepend(' '); addDate; refreshDate = window.setTimeout(addDate, 5000); $('#displayTimer').css({'font-size': "12px"}); }); //