mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 19:31:46 +00:00
Add menu option for native PiP
This commit is contained in:
@ -45,16 +45,24 @@ module.exports = (win, options) => [
|
|||||||
}],
|
}],
|
||||||
...promptOptions()
|
...promptOptions()
|
||||||
}, win)
|
}, win)
|
||||||
|
|
||||||
if (output) {
|
if (output) {
|
||||||
const { value, accelerator } = output[0];
|
const { value, accelerator } = output[0];
|
||||||
setOptions({ [value]: accelerator });
|
setOptions({ [value]: accelerator });
|
||||||
|
|
||||||
item.checked = !!accelerator;
|
item.checked = !!accelerator;
|
||||||
} else {
|
} else {
|
||||||
// Reset checkbox if prompt was canceled
|
// Reset checkbox if prompt was canceled
|
||||||
item.checked = !item.checked;
|
item.checked = !item.checked;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Use native PiP",
|
||||||
|
type: "checkbox",
|
||||||
|
checked: options.useNativePiP,
|
||||||
|
click: (item) => {
|
||||||
|
setOptions({ useNativePiP: item.checked });
|
||||||
|
},
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user