MediaWiki:Vector-2022.js
Appearance
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() {
// Wrap all body children to get the body size
$('body').children().wrapAll('<div class="mw-body-wrapper"></div>');
// Background body overlay (configuration finished in Vector-2022.css)
$('body').prepend('<div class="custom-bg-overlay"></div>');
$('.custom-bg-overlay').css({'height': $('.mw-body-wrapper').height(),
'position': 'absolute',
'pointer-events': 'none'});
// Header background overlay (configuration finished in Vector-2022.css)
$('.vector-header-container').prepend('<div class="custom-header-container-overlay"></div>');
$('.custom-header-container-overlay').css({
'height': $('.vector-header-container').height(),
'position': 'absolute',
'z-index': '-1'});
// Update on window resize
$(window).on('resize', function() {
$('.custom-bg-overlay').height($('.mw-body-wrapper').height());
$('.custom-header-container-overlay').height($('.vector-header-container').height());
});