aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/content.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/content.ts')
-rw-r--r--src/content.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/content.ts b/src/content.ts
index 050618f4..2639df8c 100644
--- a/src/content.ts
+++ b/src/content.ts
@@ -25,7 +25,7 @@ import SubmissionNotice from "./render/SubmissionNotice";
import { Message, MessageResponse, VoteResponse } from "./messageTypes";
import { SkipButtonControlBar } from "./js-components/skipButtonControlBar";
import { getStartTimeFromUrl } from "./utils/urlParser";
-import { getControls, getExistingChapters, getHashParams, isPlayingPlaylist, isVisible } from "./utils/pageUtils";
+import { getControls, getExistingChapters, getHashParams, hasAutogeneratedChapters, isPlayingPlaylist, isVisible } from "./utils/pageUtils";
import { CategoryPill } from "./render/CategoryPill";
import { AnimationUtils } from "../maze-utils/src/animationUtils";
import { GenericUtils } from "./utils/genericUtils";
@@ -1287,7 +1287,13 @@ function importExistingChapters(wait: boolean) {
existingChaptersImported = true;
updatePreviewBar();
}
- }).catch(() => { importingChaptersWaiting = false; }); // eslint-disable-line @typescript-eslint/no-empty-function
+ }).catch(() => { importingChaptersWaiting = false; });
+
+ if (!Config.config.showAutogeneratedChapters) {
+ waitFor(() => hasAutogeneratedChapters(), wait ? 15000 : 0, 400).then(() => {
+ updateActiveSegment(getCurrentTime());
+ }).catch(() => { }); // eslint-disable-line @typescript-eslint/no-empty-function
+ }
}
}
}