User:The 888th Avatar/global.js

/* */

/* Auto updating recent changes opt-in * See w:c:dev:AjaxRC for info & attribution */

AjaxRCRefreshText = 'Auto-refresh'; AjaxRCRefreshHoverText = 'Automatically refresh the page'; importScriptPage('AjaxRC/code.js', 'dev');

/* Custom edit buttons * Original by User:Grunny */

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/7/73/Button_code_nowiki.png?1", "speedTip": "code+nowiki", "tagOpen": " ", "sampleText": "Insert code here"};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/2/29/Button_user.png?1", "speedTip": "Global user template", "tagOpen": "", "tagClose": "", "sampleText": ""};

/* Add contributions option to user menu * Source to be checked */

function UserContribsMenuItem { $('ul.AccountNavigation li:first-child ul.subnav li:first-child').after('Contributions'); } addOnloadHook(UserContribsMenuItem);

/* Add a clock to the wiki header * Modified from Runescape Wiki's displayTimer to accommodate new navigation * See w:c:runescape:MediaWiki:Common.js/displayTimer.js for info & attribution */ 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')        $('div.navbackground').prepend(' ');    else        $('#p-personal ul').prepend(' ');    addDate;    refreshDate = window.setTimeout(addDate, 5000);    $('#displayTimer').css({'float': "right", 'background-color': "transparent", 'background-image': "none", 'position': "inherit", 'right': "0px", 'top': "-51px", 'font-size': "88%"}); });

/* Temporary fix for details tag * By User:Monchoman45 */

function FixDetails {for(var i in document.getElementsByTagName('details')){document.getElementsByTagName('details')[i].open = 'true';}}; addOnloadHook(FixDetails);

/* */