MediaWiki:Common.js

Note: After saving, you have to bypass your browser's cache to see the changes.

Internet Explorer: hold down the Ctrl key and click the Refresh or Reload button, or press Ctrl+F5. Firefox: hold down the Shift key while clicking Reload; alternatively press Ctrl+F5 or Ctrl-Shift-R. Opera users have to clear their caches through Tools→Preferences Konqueror and Safari users can just click the Reload button. Chrome: press Ctrl+F5 or Shift+F5 /* This code is loaded on all skins. importArticles({   type: "script",    articles: [        'u:dev:ShowHide/code.js', //      'MediaWiki:AdoptionForm.js',        'u:dev:LockOldBlogs/code.js'] }, {    type: "style",    article: "MediaWiki:StaffHighlight.css" }); /** Archive edit tab disabling ************************************* * Disables the edit tab on old forum topic pages to stop new people bumping old topics. * Page can still be edited by going via the edit tab on the history etc, or by * typing the edit address manually. * By Spang * Monaco support by Uberfuzzy * Oasis support by Uberfuzzy */ if (wgNamespaceNumber == 110 || wgNamespaceNumber === 114) { function disableOldForumEdit { if (typeof (enableOldForumEdit) != 'undefined' && enableOldForumEdit) { return; }       if (!document.getElementById('old-forum-warning')) { return; }       if (skin == 'oasis') { $('#WikiaPageHeader .wikia-menu-button > a').html('Archived').removeAttr('href'); return; }       if (!document.getElementById('ca-edit')) { return; }       var editLink = null; if (skin == 'monobook') { editLink = document.getElementById('ca-edit').firstChild; } else { return; }       editLink.removeAttribute('href', 0); editLink.removeAttribute('title', 0); editLink.style.color = 'gray'; editLink.innerHTML = 'Archived'; $('span.editsection-upper').remove; }   addOnloadHook(disableOldForumEdit); } /* Opens chat in a new window for homepage */ $(".openchat a").click(function {    window.open('/wiki/Special:Chat', 'wikiachat', 'width=600,height=600,menubar=no,status=no,location=no,toolbar=no,scrollbars=no,resizable=yes');    return false; }); /* $(function{	if ( wgNamespaceNumber === 112 || wgNamespaceNumber === 113 ||wgNamespaceNumber === 114 || wgNamespaceNumber === 115 ) {		var FEurl = wgScript + '?title=Admin_Central:Main_Page';		$('h1.wordmark.medium.graphic > a').attr('href', FEurl);	} }); if (mw.config.get('wgPageName') == 'Blog:Darwin') { $('#mw-content-text').before('  '); } /* Guided Tours */ if (mw.config.get('wgCanonicalNamespace') == 'User_blog') { setTimeout(function {		$('.guidedtours-header').each(function { var headerWidth = $(this).find('.text').width; var leftMargin = parseInt(headerWidth) + 15 + 'px'; $(this).next.css('margin-left',leftMargin); });	},250); } /* Wikia University */ $('.wu-content .box .next').on('click', function {	var currentBox = $(this).parent;	var nextBox = currentBox.next;	if (nextBox.length !== 0) {		$('html, body').animate({ scrollTop: $(nextBox).offset.top }, 500);	} });