MediaWiki:Citizen.js
MediaWiki interface page
More actions
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.
/* Pwani 2050: lift the page's hero photo (Template:Hero) above the page title so it spans the
page, like the front door's hero. Styles are in MediaWiki:Common.css. Reading view only; in the
editor the hero stays in the text where it can be changed. */
( function () {
if ( mw.config.get( 'wgAction' ) !== 'view' ) {
return;
}
var hero = document.querySelector( '#mw-content-text .okc-hero' );
var header = document.querySelector( '.mw-body-header' );
if ( !hero || !header ) {
return;
}
hero.classList.add( 'okc-hero--lifted' );
header.parentNode.insertBefore( hero, header );
}() );