mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Add review button to submission popup
This commit is contained in:
parent
3ec3a01128
commit
fc02816291
2 changed files with 25 additions and 0 deletions
|
@ -436,6 +436,9 @@
|
||||||
"preview": {
|
"preview": {
|
||||||
"message": "Preview"
|
"message": "Preview"
|
||||||
},
|
},
|
||||||
|
"inspect": {
|
||||||
|
"message": "Inspect"
|
||||||
|
},
|
||||||
"edit": {
|
"edit": {
|
||||||
"message": "Edit"
|
"message": "Edit"
|
||||||
},
|
},
|
||||||
|
|
|
@ -218,6 +218,14 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||||
</span>
|
</span>
|
||||||
): ""}
|
): ""}
|
||||||
|
|
||||||
|
{(!isNaN(segment[1])) ? (
|
||||||
|
<span id={"sponsorTimeInspectButton" + this.idSuffix}
|
||||||
|
className="sponsorTimeEditButton"
|
||||||
|
onClick={this.inspectTime.bind(this)}>
|
||||||
|
{chrome.i18n.getMessage("inspect")}
|
||||||
|
</span>
|
||||||
|
): ""}
|
||||||
|
|
||||||
{(!isNaN(segment[1])) ? (
|
{(!isNaN(segment[1])) ? (
|
||||||
<span id={"sponsorTimeEditButton" + this.idSuffix}
|
<span id={"sponsorTimeEditButton" + this.idSuffix}
|
||||||
className="sponsorTimeEditButton"
|
className="sponsorTimeEditButton"
|
||||||
|
@ -346,6 +354,20 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||||
this.props.contentContainer().previewTime(skipTime - 2);
|
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 {
|
deleteTime(): void {
|
||||||
let sponsorTimes = this.props.contentContainer().sponsorTimesSubmitting;
|
let sponsorTimes = this.props.contentContainer().sponsorTimesSubmitting;
|
||||||
let index = this.props.index;
|
let index = this.props.index;
|
||||||
|
|
Loading…
Reference in a new issue