User:Bobogoobo/common.js

From NPOWiki
Revision as of 10:46, 2 September 2025 by Bobogoobo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
$(function() {
	//Add Purge to "More" box
	if (mw.config.get('wgArticleId') && mw.config.get('wgNamespaceNumber') !== '-1') {
		$('#p-cactions .vector-menu-content-list').append(
			'<li id="ca-purge" class="mw-list-item">' +
				'<a href="?action=purge"><span>Purge</span></a>' +
			'</li>'
		);
	}

	//Default Prefix Index link to search current namespace
	$('#n-Prefix-Index a').attr('href', $('#n-Prefix-Index a').attr('href') + '?namespace=' + mw.config.get('wgNamespaceNumber'));
});