MediaWiki:Common.js: mudanças entre as edições
Aparência
JS limpo da Wiki TokuDrive |
Forçando modo escuro da Wiki TokuDrive |
||
| Linha 1: | Linha 1: | ||
(function () { | (function () { | ||
function | function forceDark() { | ||
document.querySelectorAll('input[name="search"], .cdx-text-input__input').forEach(function (input) { | document.documentElement.setAttribute('data-tokudrive-theme', 'dark'); | ||
document.documentElement.classList.add('skin-theme-clientpref-night'); | |||
document.body.classList.add('skin-theme-clientpref-night'); | |||
document.querySelectorAll('input[name="search"], .cdx-text-input__input, .vector-search-box-input').forEach(function (input) { | |||
input.placeholder = 'Pesquisar na Wiki TokuDrive'; | |||
}); | |||
document.querySelectorAll('.mw-logo').forEach(function (logo) { | |||
logo.setAttribute('title', 'Wiki TokuDrive'); | |||
logo.setAttribute('aria-label', 'Wiki TokuDrive'); | |||
}); | }); | ||
} | } | ||
if (document.readyState === 'loading') { | if (document.readyState === 'loading') { | ||
document.addEventListener('DOMContentLoaded', | document.addEventListener('DOMContentLoaded', forceDark); | ||
} else { | } else { | ||
forceDark(); | |||
} | } | ||
setTimeout(forceDark, 300); | |||
setTimeout(forceDark, 1200); | |||
})(); | })(); | ||
Edição das 17h14min de 28 de junho de 2026
(function () {
function forceDark() {
document.documentElement.setAttribute('data-tokudrive-theme', 'dark');
document.documentElement.classList.add('skin-theme-clientpref-night');
document.body.classList.add('skin-theme-clientpref-night');
document.querySelectorAll('input[name="search"], .cdx-text-input__input, .vector-search-box-input').forEach(function (input) {
input.placeholder = 'Pesquisar na Wiki TokuDrive';
});
document.querySelectorAll('.mw-logo').forEach(function (logo) {
logo.setAttribute('title', 'Wiki TokuDrive');
logo.setAttribute('aria-label', 'Wiki TokuDrive');
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', forceDark);
} else {
forceDark();
}
setTimeout(forceDark, 300);
setTimeout(forceDark, 1200);
})();