MediaWiki:Common.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Sysop (Diskussion • Beiträge) Keine Bearbeitungszusammenfassung |
Sysop (Diskussion • Beiträge) Keine Bearbeitungszusammenfassung |
||
| Zeile 1: | Zeile 1: | ||
(()=>{ | (()=>{ | ||
const observer = new MutationObserver((mutationsList, observer) => { | |||
for (mutation of mutationsList) { | for (const mutation of mutationsList) { | ||
if (mutation.type === 'childList') { | if (mutation.type === 'childList') { | ||
mutation.addedNodes.forEach(node => { | mutation.addedNodes.forEach(node => { | ||
Version vom 17. November 2025, 07:16 Uhr
(()=>{
const observer = new MutationObserver((mutationsList, observer) => {
for (const mutation of mutationsList) {
if (mutation.type === 'childList') {
mutation.addedNodes.forEach(node => {
if (node.nodeType === Node.ELEMENT_NODE) {
if (node.id === 'menue') {
console.log(node);
document.querySelector('body').prepend(node);
node.style.visibility = 'visible';
observer.disconnect();
}
}
});
}
}
});
observer.observe(document, { childList: true, subtree: true });
})()