Clean up segment creation code

Noteworthy changes:
- Adds ability to cancel creating a segment
- Makes segment creation fully the responsibility of the content script, with the popup script buttons simply doing RPC
- Adds types to the Utils.wait function
- Fixes segment timestamps backwards if user marks segment end earlier than the start
- Makes the info menu (in-page popup) workaround clearer and easier to remove in the future.
This commit is contained in:
opl-
2020-11-15 02:36:16 +01:00
parent 318d00a9c4
commit 3879cc6de3
10 changed files with 223 additions and 264 deletions

View File

@@ -6,6 +6,7 @@ const utils = new Utils();
interface SBConfig {
userID: string,
/** Contains unsubmitted segments that the user has created. */
segmentTimes: SBMap<string, SponsorTime[]>,
defaultCategory: string,
whitelistedChannels: string[],