diff options
author | Ajay Ramachandran <[email protected]> | 2020-09-10 19:52:27 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2020-09-10 19:52:27 -0400 |
commit | 2c5cc926ca5bc1dcd16a0ba13d0802cdd098753a (patch) | |
tree | dddc1c852abbeaeb69c27075bcb6d0733c995266 /src | |
parent | 39bf141e79fa3e03487834ec1533d4d61f4850cc (diff) | |
parent | fc02816291c768c7bf868804ff913057e13067ed (diff) | |
download | SponsorBlock-2c5cc926ca5bc1dcd16a0ba13d0802cdd098753a.tar.gz SponsorBlock-2c5cc926ca5bc1dcd16a0ba13d0802cdd098753a.zip |
Merge pull request #453 from thignus/add-review-button
Add review button to submission popup
Diffstat (limited to 'src')
-rw-r--r-- | src/components/SponsorTimeEditComponent.tsx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx index 396bfba8..f707d91b 100644 --- a/src/components/SponsorTimeEditComponent.tsx +++ b/src/components/SponsorTimeEditComponent.tsx @@ -219,6 +219,14 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo ): ""} {(!isNaN(segment[1])) ? ( + <span id={"sponsorTimeInspectButton" + this.idSuffix} + className="sponsorTimeEditButton" + onClick={this.inspectTime.bind(this)}> + {chrome.i18n.getMessage("inspect")} + </span> + ): ""} + + {(!isNaN(segment[1])) ? ( <span id={"sponsorTimeEditButton" + this.idSuffix} className="sponsorTimeEditButton" onClick={this.toggleEditTime.bind(this)}> @@ -346,6 +354,20 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo this.props.contentContainer().previewTime(skipTime - 2); } + inspectTime(): void { + let sponsorTimes = this.props.contentContainer().sponsorTimesSubmitting; + let index = this.props.index; + + let skipTime = sponsorTimes[index].segment[0]; + + if (this.state.editing) { + // Save edits before inspecting + this.saveEditTimes(); + } + + this.props.contentContainer().previewTime(skipTime + 0.000001); + } + deleteTime(): void { let sponsorTimes = this.props.contentContainer().sponsorTimesSubmitting; let index = this.props.index; |