mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Merge pull request #453 from thignus/add-review-button
Add review button to submission popup
This commit is contained in:
commit
2c5cc926ca
2 changed files with 25 additions and 0 deletions
|
@ -436,6 +436,9 @@
|
|||
"preview": {
|
||||
"message": "Preview"
|
||||
},
|
||||
"inspect": {
|
||||
"message": "Inspect"
|
||||
},
|
||||
"edit": {
|
||||
"message": "Edit"
|
||||
},
|
||||
|
|
|
@ -218,6 +218,14 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||
</span>
|
||||
): ""}
|
||||
|
||||
{(!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"
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue