MediaWiki:VectorPlus.js

Revision as of 01:39, 23 February 2024 by Makko Oko (talk | contribs)
Jump to navigation Jump to search

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.
$(function(){
    // Check if the elements exist
    if (!$('#t-whatlinkshere').length || !$('#t-recentchanges').length || !$('#t-permalink').length || !$('#t-info').length) {
        return;
    }

    // Create a dropdown menu for the tools
    $('<div id="p-custom-tools" class="vector-menu vector-menu-dropdown">').append(
        $('<h3>').text('Tools'),
        $('<div class="menu">').append(
            $('#t-whatlinkshere, #t-recentchanges, #t-permalink, #t-info')
        )
    ).insertAfter('#ca-history');
})