Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.js

MediaWiki interface page
Revision as of 21:10, 3 April 2026 by Thatrobin3001 (talk | contribs)

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

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/* Any JavaScript here will be loaded for all users on every page load. */
$(function() {
    $('[accesskey="t"]').removeAttr('accesskey');
    $('[accesskey="n"]').removeAttr('accesskey');
    $('#pt-mytalk').remove();
    $('#ca-talk').remove();
    $('#ca-addsection').remove();
});

$(function() {
    setTimeout(function() {
        var $redirect = $('span.mw-redirectedfrom a');
        if ($redirect.length) {
            var from = $redirect.text().trim();
            $('[role="tabpanel"]').each(function() {
                var panelText = $(this).text();
                if (panelText.indexOf(from) !== -1) {
                    var panelId = $(this).attr('id');
                    var tab = document.querySelector('[aria-controls="' + panelId + '"]');
                    if (tab) {
                        tab.click();
                    }
                    return false;
                }
            });
        }
    }, 500);
});