aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/SponsorTimeEditComponent.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/SponsorTimeEditComponent.tsx')
-rw-r--r--src/components/SponsorTimeEditComponent.tsx22
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;