MediaWiki:Common.js

From Practices and Politics of Representation
Revision as of 12:02, 8 October 2026 by Admin (talk | contribs) (Noindex for the hidden Practices of Space pages)
(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.
/* Practices of Space: hidden section.
 * Not linked from the menus. Adds a robots noindex tag so search engines
 * do not list these pages (MediaWiki ignores __NOINDEX__ in the main namespace here). */
( function () {
	if ( !/^Practices_of_Space(\/|$)/.test( mw.config.get( 'wgPageName' ) ) ) {
		return;
	}
	var meta = document.querySelector( 'meta[name="robots"]' );
	if ( !meta ) {
		meta = document.createElement( 'meta' );
		meta.name = 'robots';
		document.head.appendChild( meta );
	}
	meta.content = 'noindex,nofollow';
}() );