|
|
Linha 8: |
Linha 8: |
| document.head.appendChild(link); | | document.head.appendChild(link); |
| }); | | }); |
|
| |
| /* Logo no quando muda o modo Dark/Light */
| |
| document.addEventListener('DOMContentLoaded', () => {
| |
| const logo = document.querySelector('.mw-logo-icon img');
| |
| if (!logo) return;
| |
|
| |
| function updateLogo() {
| |
| const body = document.body;
| |
| if (body.classList.contains('vector-dark') || body.classList.contains('skin-dark')) {
| |
| logo.src = 'https://wiki.cinelinux.com/images/cinelinux-icon-dark.png';
| |
| } else {
| |
| logo.src = 'https://wiki.cinelinux.com/images/cinelinux-icon-light.png';
| |
| }
| |
| logo.style.height = '50px';
| |
| logo.style.width = 'auto';
| |
| logo.style.maxWidth = '100%';
| |
| }
| |
|
| |
| updateLogo();
| |
|
| |
| // Observar mudanças na classe do body pra atualizar logo em tempo real
| |
| const observer = new MutationObserver(mutations => {
| |
| mutations.forEach(() => {
| |
| updateLogo();
| |
| });
| |
| });
| |
|
| |
| observer.observe(document.body, { attributes: true, attributeFilter: ['class'] });
| |
| });
| |
|
| |
|
| |
|
| /* Alterar Texto Logo no Vector 2022 */ | | /* Alterar Texto Logo no Vector 2022 */ |