Файловый менеджер - Редактировать - /var/www/html/mediawiki-1.43.1/skins/MinervaNeue/resources/skins.minerva.scripts/reportIfNightModeWasDisabledOnPage.js
Ðазад
/** * @private * @return {boolean} */ function reportDisabled() { mw.notify( mw.msg( 'skin-minerva-night-mode-unavailable' ) ); return true; } /** * @ignore * @param {Document} doc * @return {boolean} whether it was reported as disabled. */ function reportIfNightModeWasDisabledOnPage( doc ) { if ( !doc.classList.contains( 'skin-night-mode-page-disabled' ) ) { return false; } // Cast to string. let userExpectedNightMode = `${ mw.user.options.get( 'minerva-theme' ) }`; if ( !mw.user.isNamed() ) { // bit more convoulated here and will break with upstream changes... // this is protected by an integration test in integration.test.js const cookieValue = mw.cookie.get( 'mwclientpreferences' ) || ''; const match = cookieValue.match( /skin-theme-clientpref-(\S+)/ ); if ( match ) { // we found something in the cookie. userExpectedNightMode = match[ 1 ]; } } if ( userExpectedNightMode === 'night' ) { return reportDisabled(); } else if ( userExpectedNightMode === 'os' && matchMedia( '( prefers-color-scheme: dark )' ).matches ) { return reportDisabled(); } else { return false; } } module.exports = reportIfNightModeWasDisabledOnPage;
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка