add bindMediaKey to options

This commit is contained in:
Michael C
2022-01-27 01:43:40 -05:00
parent 6d0d533fa7
commit 876b55dcc1
4 changed files with 25 additions and 2 deletions

View File

@@ -1273,7 +1273,8 @@ function skipToTime({v, skipTime, skippingSegments, openNotice, forceAutoSkip, u
const beep = new Audio(chrome.runtime.getURL("icons/beep.ogg"));
beep.volume = video.volume * 0.1;
beep.play();
window.addEventListener("keydown", mediaPauseListener);
if (Config.config.audioNotificationOnSkip && Config.config.bindMediaKey)
window.addEventListener("keydown", mediaPauseListener);
}
if (!autoSkip