aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/SubmissionNoticeComponent.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/SubmissionNoticeComponent.tsx')
-rw-r--r--src/components/SubmissionNoticeComponent.tsx19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/components/SubmissionNoticeComponent.tsx b/src/components/SubmissionNoticeComponent.tsx
index a9943479..de7d4df9 100644
--- a/src/components/SubmissionNoticeComponent.tsx
+++ b/src/components/SubmissionNoticeComponent.tsx
@@ -93,13 +93,6 @@ class SubmissionNoticeComponent extends React.Component<SubmissionNoticeProps, S
<td className="sponsorSkipNoticeRightSection"
style={{position: "relative"}}>
- {/* Cancel Button */}
- <button className="sponsorSkipObject sponsorSkipNoticeButton sponsorSkipNoticeRightButton"
- onClick={this.cancel.bind(this)}>
-
- {chrome.i18n.getMessage("cancel")}
- </button>
-
{/* Submit Button */}
<button className="sponsorSkipObject sponsorSkipNoticeButton sponsorSkipNoticeRightButton"
onClick={this.submit.bind(this)}>
@@ -167,6 +160,18 @@ class SubmissionNoticeComponent extends React.Component<SubmissionNoticeProps, S
ref.current.saveEditTimes();
}
+ // Check if any non music categories are being used on a music video
+ if (this.contentContainer().videoInfo.microformat.playerMicroformatRenderer.category === "Music") {
+ let sponsorTimesSubmitting = this.props.contentContainer().sponsorTimesSubmitting;
+ for (const sponsorTime of sponsorTimesSubmitting) {
+ if (!sponsorTime.category.startsWith("music_")) {
+ if (!confirm(chrome.i18n.getMessage("nonMusicCategoryOnMusic"))) return;
+
+ break;
+ }
+ }
+ }
+
this.props.callback();
this.cancel();