MediaWiki:Common.js: Difference between revisions

Content deleted Content added
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
 
Line 353:
});
});
 
/* Hide floating nav buttons when AI panel is open (Mobile) */
(function () {
if (!window.matchMedia('(max-width: 768px)').matches) return;
 
setInterval(function () {
var panel = document.querySelector('.ext-aiassistant-panel');
var isOpen = false;
 
if (panel) {
var style = getComputedStyle(panel);
isOpen = style.display !== 'none' && style.visibility !== 'hidden';
}
 
document.body.classList.toggle('ai-panel-open', isOpen);
}, 300);
})();