MediaWiki:Common.js

Revision as of 20:50, 13 January 2026 by MikeParker (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.
  // Collapse Notes section when clicking on back-to-text links from references
  $(document).on('click', '.mw-cite-backlink a, .references .cite-backlink a, ol.references a[href^="#cite_ref-"]', function(e) {
      // Check if Notes content exists and is visible
      if (notesContent.length > 0 && notesContent.is(':visible')) {
          // Collapse the Notes section
          notesContent.slideUp(150);
      }
      // Allow the link to work normally (don't prevent default) - it will scroll to the citation in the text
  });