MediaWiki:Common.js
Перейти к навигации
Перейти к поиску
Замечание: Возможно, после публикации вам придётся очистить кэш своего браузера, чтобы увидеть изменения.
- Firefox / Safari: Удерживая клавишу Shift, нажмите на панели инструментов Обновить либо нажмите Ctrl+F5 или Ctrl+R (⌘+R на Mac)
- Google Chrome: Нажмите Ctrl+Shift+R (⌘+Shift+R на Mac)
- Internet Explorer / Edge: Удерживая Ctrl, нажмите Обновить либо нажмите Ctrl+F5
- Opera: Нажмите Ctrl+F5.
/* Any JavaScript here will be loaded for all users on every page load. */
function AprilFools() {
var today = new Date();
if (today.getMonth() === 3 && today.getDate() === 1) {
document.querySelector('.mw-wiki-logo').style.backgroundImage = "url('https://infernummod.wiki.gg/images/2/22/AprilFoolsLogo.png')";
document.querySelector('.mw-wiki-logo').title = "Happy April Fools'!";
}
}
AprilFools();
/*** Mobile navigation toggle button ***/
$( function () {
var mobileSidebarButton = document.createElement( 'button' );
mobileSidebarButton.className = 'mobile-nav-toggle';
mobileSidebarButton.addEventListener( 'click', function () {
mobileSidebarButton.classList.toggle( 'nav--expanded' );
} );
document.body.classList.add( 'has-vector-mobile-menu' );
document.getElementById( 'mw-panel' ).prepend( mobileSidebarButton );
} );
/*** End mobile navigation toggle button ***/