mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
20 lines
530 B
JavaScript
20 lines
530 B
JavaScript
const { enabled } = require("./back");
|
|
const { setOptions } = require("../../config/plugins");
|
|
|
|
module.exports = (win, options) => [
|
|
{
|
|
label: "Arrowkeys controls",
|
|
type: "checkbox",
|
|
checked: !!options.arrowsShortcut,
|
|
click: (item) => {
|
|
// Dynamically change setting if plugin enabled
|
|
if (enabled()) {
|
|
win.webContents.send("setArrowsShortcut", item.checked);
|
|
} else { // Fallback to usual method if disabled
|
|
options.arrowsShortcut = item.checked;
|
|
setOptions("precise-volume", options);
|
|
}
|
|
}
|
|
}
|
|
];
|