diff options
author | Ajay Ramachandran <[email protected]> | 2021-01-10 21:02:34 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-10 21:02:34 -0500 |
commit | e32a251ef374c1dbffb9f36b0fa0349898089bec (patch) | |
tree | 038e1cf19f8abdc429f1dfc85a2f0451be1dcc8a | |
parent | 33ec82882dcc3b4637f6f3661fd1e67a886cdc8e (diff) | |
parent | edd8ac55d02e7f84abc45ee273273030053070b0 (diff) | |
download | SponsorBlock-e32a251ef374c1dbffb9f36b0fa0349898089bec.tar.gz SponsorBlock-e32a251ef374c1dbffb9f36b0fa0349898089bec.zip |
Merge pull request #605 from ajayyy/youcap
Revert "Add notice about YouCap"
-rw-r--r-- | src/components/SubmissionNoticeComponent.tsx | 35 | ||||
-rw-r--r-- | src/config.ts | 8 |
2 files changed, 3 insertions, 40 deletions
diff --git a/src/components/SubmissionNoticeComponent.tsx b/src/components/SubmissionNoticeComponent.tsx index 381c5109..c6aae60a 100644 --- a/src/components/SubmissionNoticeComponent.tsx +++ b/src/components/SubmissionNoticeComponent.tsx @@ -32,8 +32,6 @@ class SubmissionNoticeComponent extends React.Component<SubmissionNoticeProps, S videoObserver: MutationObserver; - showingYouCapNotice: boolean; - constructor(props: SubmissionNoticeProps) { super(props); this.noticeRef = React.createRef(); @@ -47,7 +45,7 @@ class SubmissionNoticeComponent extends React.Component<SubmissionNoticeProps, S this.state = { noticeTitle, messages: [], - idSuffix: "SubmissionNotice", + idSuffix: "SubmissionNotice" } } @@ -89,8 +87,6 @@ class SubmissionNoticeComponent extends React.Component<SubmissionNoticeProps, S </td> </tr> - {this.getYouCapMessage()} - {/* Last Row */} <tr id={"sponsorSkipNoticeSecondRow" + this.state.idSuffix}> @@ -117,35 +113,6 @@ class SubmissionNoticeComponent extends React.Component<SubmissionNoticeProps, S ); } - /** TODO: Remove */ - getYouCapMessage(): JSX.Element { - if (Config.config.sponsorTimesContributed < 20 - || (Config.config.hasShownYouCapNotice && !this.showingYouCapNotice)) { - return; - } - - Config.config.hasShownYouCapNotice = true; - if (!this.showingYouCapNotice) { - this.showingYouCapNotice = true; - } - - return ( - <tr style={{textAlign: "center"}}> - <p style={{width: "300px", textAlign: "center", display: "inline-block", fontSize: "11px"}}> - Like contributing to crowdsourced projects? - Consider checking out <a href="https://gist.github.com/ajayyy/6f2cf90dd66e51067a7ab5e63544cd4e" style={{textDecoration: "underline"}} target="_blank" rel="noreferrer">YouCap or NekoCap</a>, - new open-source replacements for YouTube{"'"}s now defunct community captions. - </p> - - <img src={chrome.extension.getURL("icons/close.png")} - style={{padding: "0", margin: "auto"}} - className="sponsorSkipObject sponsorSkipNoticeButton sponsorSkipNoticeCloseButton" - onClick={() => { this.showingYouCapNotice = false; this.forceUpdate(); }}> - </img> - </tr> - ); - } - getSponsorTimeMessages(): JSX.Element[] | JSX.Element { const elements: JSX.Element[] = []; this.timeEditRefs = []; diff --git a/src/config.ts b/src/config.ts index d113e86c..2a40dbf6 100644 --- a/src/config.ts +++ b/src/config.ts @@ -55,9 +55,7 @@ interface SBConfig { "preview-selfpromo": PreviewBarOption, "music_offtopic": PreviewBarOption, "preview-music_offtopic": PreviewBarOption, - }, - - hasShownYouCapNotice: boolean + } } export interface SBObject { @@ -231,9 +229,7 @@ const Config: SBObject = { color: "#a6634a", opacity: "0.7" } - }, - - hasShownYouCapNotice: false + } }, localConfig: null, config: null, |