MediaWiki:Vector-2022.js: Unterschied zwischen den Versionen

Aus TerranianStar
Zur Navigation springen Zur Suche springen
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 2: Zeile 2:


     const box = document.createElement('div');
     const box = document.createElement('div');
     box.textContent = "Vector-2022.js läuft!";
     box.textContent = "Common.js läuft!";
     box.style.position = "fixed";
     box.style.position = "fixed";
     box.style.top = "10px";
     box.style.top = "20px";
     box.style.left = "10px";
     box.style.left = "20px";
     box.style.background = "lime";
     box.style.background = "lime";
     box.style.color = "black";
     box.style.color = "black";
     box.style.padding = "10px";
     box.style.padding = "12px 18px";
     box.style.border = "2px solid black";
     box.style.border = "3px solid black";
     box.style.zIndex = "99999";
 
    // WICHTIG: Höchster z-index, den Vector nicht überdeckt
     box.style.zIndex = "999999999";
 
    // Damit Vector-Header sie NICHT überdeckt
    box.style.pointerEvents = "none";


     document.body.appendChild(box);
     document.body.appendChild(box);


     setTimeout(() => {
     setTimeout(() => box.remove(), 5000);
        box.remove();
    }, 5000);
});
});

Version vom 24. Mai 2026, 14:52 Uhr

document.addEventListener('DOMContentLoaded', function () {

    const box = document.createElement('div');
    box.textContent = "Common.js läuft!";
    box.style.position = "fixed";
    box.style.top = "20px";
    box.style.left = "20px";
    box.style.background = "lime";
    box.style.color = "black";
    box.style.padding = "12px 18px";
    box.style.border = "3px solid black";

    // WICHTIG: Höchster z-index, den Vector nicht überdeckt
    box.style.zIndex = "999999999";

    // Damit Vector-Header sie NICHT überdeckt
    box.style.pointerEvents = "none";

    document.body.appendChild(box);

    setTimeout(() => box.remove(), 5000);
});