Forum Discussion
Slide loading animation off-centre and too small
With this addition to the index_lms.html I managed to get rid of the dark transparent box behind the slider loader (insert after </body>):
<script>
document.addEventListener("DOMContentLoaded", () => {
function neutralizeDarkBackground(el) {
if (!(el instanceof HTMLElement)) return;
const bg = getComputedStyle(el).backgroundColor;
if (bg === 'rgba(0, 0, 0, 0.5)' || bg === 'rgba(0, 0, 0, 0.7)') {
el.style.backgroundColor = 'transparent';
}
}
const observer = new MutationObserver(mutations => {
for (const mutation of mutations) {
for (const node of mutation.addedNodes) {
neutralizeDarkBackground(node);
// auch direkte Kinder prüfen (aber nicht den ganzen Baum!)
if (node.querySelectorAll) {
node.querySelectorAll(':scope > div').forEach(neutralizeDarkBackground);
}
}
}
});
observer.observe(document.body, {
childList: true,
subtree: true
});
});
</script>
Related Content
- 11 months ago