mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 21:47:06 +03:00
Submodule public/_locales updated: 01bf91daef...0c9f999894
@@ -433,6 +433,11 @@
|
|||||||
<div class="inline"></div>
|
<div class="inline"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div data-type="keybind-change" data-sync="closeSkipNoticeKeybind">
|
||||||
|
<label class="optionLabel">__MSG_setCloseSkipNoticeKeybind__:</label>
|
||||||
|
<div class="inline"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div data-type="keybind-change" data-sync="startSponsorKeybind">
|
<div data-type="keybind-change" data-sync="startSponsorKeybind">
|
||||||
<label class="optionLabel">__MSG_setStartSponsorShortcut__:</label>
|
<label class="optionLabel">__MSG_setStartSponsorShortcut__:</label>
|
||||||
<div class="inline"></div>
|
<div class="inline"></div>
|
||||||
|
|||||||
@@ -141,10 +141,11 @@ class KeybindDialogComponent extends React.Component<KeybindDialogProps, Keybind
|
|||||||
return {message: chrome.i18n.getMessage("youtubeKeybindWarning"), blocking: false};
|
return {message: chrome.i18n.getMessage("youtubeKeybindWarning"), blocking: false};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.option != "skipKeybind" && this.equals(Config.config['skipKeybind']) ||
|
if (this.props.option !== "skipKeybind" && this.equals(Config.config['skipKeybind']) ||
|
||||||
this.props.option != "submitKeybind" && this.equals(Config.config['submitKeybind']) ||
|
this.props.option !== "submitKeybind" && this.equals(Config.config['submitKeybind']) ||
|
||||||
this.props.option !== "actuallySubmitKeybind" && this.equals(Config.config['actuallySubmitKeybind']) ||
|
this.props.option !== "actuallySubmitKeybind" && this.equals(Config.config['actuallySubmitKeybind']) ||
|
||||||
this.props.option != "startSponsorKeybind" && this.equals(Config.config['startSponsorKeybind']))
|
this.props.option !== "closeSkipNoticeKeybind" && this.equals(Config.config['closeSkipNoticeKeybind']) ||
|
||||||
|
this.props.option !== "startSponsorKeybind" && this.equals(Config.config['startSponsorKeybind']))
|
||||||
return {message: chrome.i18n.getMessage("keyAlreadyUsed"), blocking: true};
|
return {message: chrome.i18n.getMessage("keyAlreadyUsed"), blocking: true};
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ interface SBConfig {
|
|||||||
actuallySubmitKeybind: Keybind;
|
actuallySubmitKeybind: Keybind;
|
||||||
nextChapterKeybind: Keybind;
|
nextChapterKeybind: Keybind;
|
||||||
previousChapterKeybind: Keybind;
|
previousChapterKeybind: Keybind;
|
||||||
|
closeSkipNoticeKeybind: Keybind;
|
||||||
|
|
||||||
// What categories should be skipped
|
// What categories should be skipped
|
||||||
categorySelections: CategorySelection[];
|
categorySelections: CategorySelection[];
|
||||||
@@ -345,6 +346,7 @@ const syncDefaults = {
|
|||||||
actuallySubmitKeybind: { key: "'", ctrl: true },
|
actuallySubmitKeybind: { key: "'", ctrl: true },
|
||||||
nextChapterKeybind: { key: "ArrowRight", ctrl: true },
|
nextChapterKeybind: { key: "ArrowRight", ctrl: true },
|
||||||
previousChapterKeybind: { key: "ArrowLeft", ctrl: true },
|
previousChapterKeybind: { key: "ArrowLeft", ctrl: true },
|
||||||
|
closeSkipNoticeKeybind: { key: "Backspace" },
|
||||||
|
|
||||||
categorySelections: [{
|
categorySelections: [{
|
||||||
name: "sponsor" as Category,
|
name: "sponsor" as Category,
|
||||||
|
|||||||
@@ -2458,6 +2458,7 @@ function hotkeyListener(e: KeyboardEvent): void {
|
|||||||
|
|
||||||
const skipKey = Config.config.skipKeybind;
|
const skipKey = Config.config.skipKeybind;
|
||||||
const skipToHighlightKey = Config.config.skipToHighlightKeybind;
|
const skipToHighlightKey = Config.config.skipToHighlightKeybind;
|
||||||
|
const closeSkipNoticeKey = Config.config.closeSkipNoticeKeybind;
|
||||||
const startSponsorKey = Config.config.startSponsorKeybind;
|
const startSponsorKey = Config.config.startSponsorKeybind;
|
||||||
const submitKey = Config.config.actuallySubmitKeybind;
|
const submitKey = Config.config.actuallySubmitKeybind;
|
||||||
const openSubmissionMenuKey = Config.config.submitKeybind;
|
const openSubmissionMenuKey = Config.config.submitKeybind;
|
||||||
@@ -2475,6 +2476,12 @@ function hotkeyListener(e: KeyboardEvent): void {
|
|||||||
skipButtonControlBar.toggleSkip.call(skipButtonControlBar);
|
skipButtonControlBar.toggleSkip.call(skipButtonControlBar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
} else if (keybindEquals(key, closeSkipNoticeKey)) {
|
||||||
|
for (let i = 0; i < skipNotices.length; i++) {
|
||||||
|
skipNotices.pop().close();
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} else if (keybindEquals(key, startSponsorKey)) {
|
} else if (keybindEquals(key, startSponsorKey)) {
|
||||||
startOrEndTimingNewSegment();
|
startOrEndTimingNewSegment();
|
||||||
|
|||||||
Reference in New Issue
Block a user