This commit is contained in:
Araxeus
2023-01-22 19:18:10 +02:00
parent c6bb0cfe88
commit 333b695b16

View File

@ -49,11 +49,8 @@ module.exports = (options) => {
function setupSearchOpenObserver() { function setupSearchOpenObserver() {
const searchOpenObserver = new MutationObserver(mutations => { const searchOpenObserver = new MutationObserver(mutations => {
if (mutations[0].target.opened) { $('#nav-bar-background').style.webkitAppRegion =
$('#nav-bar-background').style.webkitAppRegion = 'no-drag' mutations[0].target.opened ? 'no-drag' : 'drag';
} else {
$('#nav-bar-background').style.webkitAppRegion = 'drag'
}
}); });
searchOpenObserver.observe($('ytmusic-search-box'), { attributeFilter: ["opened"] }) searchOpenObserver.observe($('ytmusic-search-box'), { attributeFilter: ["opened"] })
} }