diff --git a/public/_locales b/public/_locales
index b5f7f008..01bf91da 160000
--- a/public/_locales
+++ b/public/_locales
@@ -1 +1 @@
-Subproject commit b5f7f0089b0971d7f226edf0044d3cb858407890
+Subproject commit 01bf91daef4ed4d3f9ed02096b8186799dc73731
diff --git a/public/options/options.html b/public/options/options.html
index 52a58123..5a9c78e1 100644
--- a/public/options/options.html
+++ b/public/options/options.html
@@ -439,6 +439,11 @@
+
+
+
+
+
diff --git a/src/components/options/KeybindDialogComponent.tsx b/src/components/options/KeybindDialogComponent.tsx
index 057a3b05..f67c82b5 100644
--- a/src/components/options/KeybindDialogComponent.tsx
+++ b/src/components/options/KeybindDialogComponent.tsx
@@ -143,6 +143,7 @@ class KeybindDialogComponent extends React.Component {
createButton("startSegment", "sponsorStart", () => startOrEndTimingNewSegment(), "PlayerStartIconSponsorBlocker.svg");
createButton("cancelSegment", "sponsorCancel", () => cancelCreatingSegment(), "PlayerCancelSegmentIconSponsorBlocker.svg");
createButton("delete", "clearTimes", () => clearSponsorTimes(), "PlayerDeleteIconSponsorBlocker.svg");
- createButton("submit", "OpenSubmissionMenu", () => submitSponsorTimes(), "PlayerUploadIconSponsorBlocker.svg");
+ createButton("submit", "OpenSubmissionMenu", () => openSubmissionMenu(), "PlayerUploadIconSponsorBlocker.svg");
createButton("info", "openPopup", () => openInfoMenu(), "PlayerInfoIconSponsorBlocker.svg");
const controlsContainer = getControls();
@@ -2227,10 +2227,14 @@ function resetSponsorSubmissionNotice(callRef = true) {
submissionNotice = null;
}
-function submitSponsorTimes() {
+function closeSubmissionMenu() {
+ submissionNotice?.close();
+ submissionNotice = null;
+}
+
+function openSubmissionMenu() {
if (submissionNotice !== null){
- submissionNotice.close();
- submissionNotice = null;
+ closeSubmissionMenu();
return;
}
@@ -2240,6 +2244,15 @@ function submitSponsorTimes() {
}
+function submitSegments() {
+ if (sponsorTimesSubmitting !== undefined
+ && sponsorTimesSubmitting.length > 0
+ && submissionNotice !== null) {
+ submissionNotice.submit();
+ }
+
+}
+
//send the message to the background js
//called after all the checks have been made that it's okay to do so
async function sendSubmitMessage() {
@@ -2446,7 +2459,8 @@ function hotkeyListener(e: KeyboardEvent): void {
const skipKey = Config.config.skipKeybind;
const skipToHighlightKey = Config.config.skipToHighlightKeybind;
const startSponsorKey = Config.config.startSponsorKeybind;
- const submitKey = Config.config.submitKeybind;
+ const submitKey = Config.config.actuallySubmitKeybind;
+ const openSubmissionMenuKey = Config.config.submitKeybind;
const nextChapterKey = Config.config.nextChapterKeybind;
const previousChapterKey = Config.config.previousChapterKeybind;
@@ -2466,7 +2480,10 @@ function hotkeyListener(e: KeyboardEvent): void {
startOrEndTimingNewSegment();
return;
} else if (keybindEquals(key, submitKey)) {
- submitSponsorTimes();
+ submitSegments();
+ return;
+ } else if (keybindEquals(key, openSubmissionMenuKey)) {
+ openSubmissionMenu();
return;
} else if (keybindEquals(key, nextChapterKey)) {
if (sponsorTimes.length > 0) e.stopPropagation();
@@ -2485,7 +2502,7 @@ function hotkeyListener(e: KeyboardEvent): void {
} else if (key.key == startSponsorKey?.key && startSponsorKey.code == null && !keybindEquals(Config.syncDefaults.startSponsorKeybind, startSponsorKey)) {
startOrEndTimingNewSegment();
} else if (key.key == submitKey?.key && submitKey.code == null && !keybindEquals(Config.syncDefaults.submitKeybind, submitKey)) {
- submitSponsorTimes();
+ openSubmissionMenu();
}
}
diff --git a/src/render/SubmissionNotice.tsx b/src/render/SubmissionNotice.tsx
index 295d8e2b..671dde6b 100644
--- a/src/render/SubmissionNotice.tsx
+++ b/src/render/SubmissionNotice.tsx
@@ -52,6 +52,10 @@ class SubmissionNotice {
this.noticeElement.remove();
}
+
+ submit(): void {
+ this.noticeRef.current?.submit?.();
+ }
}
export default SubmissionNotice;
\ No newline at end of file