mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-25 17:08:42 +03:00
add bindMediaKey to options
This commit is contained in:
@@ -36,7 +36,8 @@ interface SBConfig {
|
||||
serverAddress: string,
|
||||
minDuration: number,
|
||||
skipNoticeDuration: number,
|
||||
audioNotificationOnSkip,
|
||||
audioNotificationOnSkip: boolean,
|
||||
bindMediaKey: boolean,
|
||||
checkForUnlistedVideos: boolean,
|
||||
testingServer: boolean,
|
||||
refetchWhenNotFound: boolean,
|
||||
@@ -198,6 +199,7 @@ const Config: SBObject = {
|
||||
minDuration: 0,
|
||||
skipNoticeDuration: 4,
|
||||
audioNotificationOnSkip: false,
|
||||
bindMediaKey: false,
|
||||
checkForUnlistedVideos: false,
|
||||
testingServer: false,
|
||||
refetchWhenNotFound: true,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user