MediaWiki:Common.js: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Tag: Reverted
Line 353:
});
});
 
/* Hide floating buttons when AI Assistant panel is open (Mobile) */
(function () {
if (window.matchMedia('(max-width: 768px)').matches) {
var observer = new MutationObserver(function () {
var panel = document.querySelector('.ext-aiassistant-panel');
if (panel && panel.offsetParent !== null) {
document.body.classList.add('ai-panel-open');
} else {
document.body.classList.remove('ai-panel-open');
}
});
observer.observe(document.body, { childList: true, subtree: true, attributes: true });
}
})();