User:Natsu11/global.js

/* Add a clock to the wiki header * See w:c:runescape:MediaWiki:Common.js/displayTimer.js for info & attribution */ importScriptPage('MediaWiki:Common.js/displayTimer.js', 'runescape');

/* Auto-refresh the Recentchanges and Wikiactivity; copied from Avatar Wiki's */

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

/* add contribs to user menu - 2/1/11; by Monchoman45 */

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

/* add a button that increases the content size and hides the rail */ function CreateContentResizeButton { var contentWidth = $('#WikiaMainContent').width; var catlinksWidth = $('#catlinks').width; var html = ' Expand <--> '; if(contentWidth < 1000) { if($('#WikiHeader .wikia-menu-button').length > 0) {$('#WikiHeader .wikia-menu-button').after(html);} if($('#WikiHeader .wikia-button').length > 0) {$('#WikiHeader .wikia-button').after(html);} if($('#WikiHeader .view-source').length > 0) {$('#WikiHeader .view-source').after(html);} if(wgCanonicalNamespace == 'User_blog') {$('#WikiaUserPagesHeader .wikia-button').after(html);} } } addOnloadHook(CreateContentResizeButton); function ExpandContent(contentWidth, catlinksWidth) { document.getElementById('WikiaMainContent').style.width = '1000px'; document.getElementById('catlinks').style.width = '1000px'; document.getElementById('WikiaRail').style.display = 'none'; $('#resizeButton a').replaceWith(' Compress >--< '); }

function CompressContent(contentWidth, catlinksWidth) { document.getElementById('WikiaMainContent').style.width = contentWidth; document.getElementById('catlinks').style.width = catlinksWidth; document.getElementById('WikiaRail').style.display = 'block'; $('#resizeButton a').replaceWith(' Expand <--> ');