mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 11:37:02 +03:00
Merge pull request #453 from thignus/add-review-button
Add review button to submission popup
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user