Diferencia entre revisiones de «MediaWiki:Common.js»
Sync jugable Hub De Vors Etiqueta: Reversión manual |
mobile night |
||
| Línea 1: | Línea 1: | ||
/* Hub De Vors */ | /* Hub De Vors: tema noche + viewport móvil */ | ||
document.documentElement.style.colorScheme='dark'; | (function () { | ||
try { | |||
document.documentElement.classList.add('skin-theme-clientpref-night'); | |||
document.documentElement.style.colorScheme = 'dark'; | |||
var key = 'mwclientpreferences'; | |||
var cur = localStorage.getItem(key) || ''; | |||
if (cur.indexOf('skin-theme-clientpref-night') === -1) { | |||
localStorage.setItem(key, (cur ? cur + ',' : '') + 'skin-theme-clientpref-night'); | |||
} | |||
// Minerva dark class if present | |||
if (document.body && document.body.classList.contains('skin-minerva')) { | |||
document.documentElement.classList.add('theme-dark'); | |||
document.body.classList.add('theme-dark'); | |||
} | |||
} catch (e) {} | |||
})(); | |||