diff options
author | Ajay Ramachandran <[email protected]> | 2020-09-16 13:54:02 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2020-09-16 13:54:02 -0400 |
commit | 2f9ad953100af10ef486c0d7132f90731d9800fe (patch) | |
tree | 25540a1fa020050d992a494e254eb6320b8b6603 | |
parent | b4e1cb0cfdf9f6544d0598b728d1ff6870ea2994 (diff) | |
parent | 70a86e5a11320a96862989857c199f5f14a8a37b (diff) | |
download | SponsorBlock-2f9ad953100af10ef486c0d7132f90731d9800fe.tar.gz SponsorBlock-2f9ad953100af10ef486c0d7132f90731d9800fe.zip |
Merge pull request #476 from ajayyy/expiremental
Improvements
-rw-r--r-- | public/_locales/en/messages.json | 4 | ||||
-rw-r--r-- | src/components/SponsorTimeEditComponent.tsx | 2 | ||||
-rw-r--r-- | src/content.ts | 4 | ||||
-rw-r--r-- | src/types.ts | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index 6cb67739..e3e67a82 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -401,7 +401,7 @@ "message": "Reset" }, "customAddressError": { - "message": "This address is not in the right form. Make sure you have http:// or https:// at the begining and no trailing slashes." + "message": "This address is not in the right form. Make sure you have http:// or https:// at the beginning and no trailing slashes." }, "areYouSureReset": { "message": "Are you sure you would like to reset this?" @@ -608,7 +608,7 @@ "message": "Wrong Category" }, "nonMusicCategoryOnMusic": { - "message": "This video is categorized as music. Are you sure you this has a sponsor? If this is actually a \"Non-Music segment\", open up the extension options and enable this category. Then, you can submit this segment as \"Non-Music\" instead of sponsor. Please read the guidelines if you are confused." + "message": "This video is categorized as music. Are you sure this has a sponsor? If this is actually a \"Non-Music segment\", open up the extension options and enable this category. Then, you can submit this segment as \"Non-Music\" instead of sponsor. Please read the guidelines if you are confused." }, "multipleSegments": { "message": "Multiple Segments" diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx index f707d91b..0f608027 100644 --- a/src/components/SponsorTimeEditComponent.tsx +++ b/src/components/SponsorTimeEditComponent.tsx @@ -365,7 +365,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo this.saveEditTimes(); } - this.props.contentContainer().previewTime(skipTime + 0.000001); + this.props.contentContainer().previewTime(skipTime + 0.000001, false); } deleteTime(): void { diff --git a/src/content.ts b/src/content.ts index 91cb4f37..f4156d83 100644 --- a/src/content.ts +++ b/src/content.ts @@ -992,11 +992,11 @@ function getStartTimes(sponsorTimes: SponsorTime[], includeIntersectingSegments: * * @param time */ -function previewTime(time: number) { +function previewTime(time: number, unpause = true) { video.currentTime = time; // Unpause the video if needed - if (video.paused){ + if (unpause && video.paused){ video.play(); } } diff --git a/src/types.ts b/src/types.ts index 3d0f783e..bb1b0c6d 100644 --- a/src/types.ts +++ b/src/types.ts @@ -16,7 +16,7 @@ interface ContentContainer { sponsorSubmissionNotice: SubmissionNotice, resetSponsorSubmissionNotice: () => void, changeStartSponsorButton: (showStartSponsor: any, uploadButtonVisible: any) => Promise<boolean>, - previewTime: (time: number) => void, + previewTime: (time: number, unpause?: boolean) => void, videoInfo: any, getRealCurrentTime: () => number } |