diff options
author | Ajay <[email protected]> | 2022-01-06 02:06:55 -0500 |
---|---|---|
committer | Ajay <[email protected]> | 2022-01-06 02:06:55 -0500 |
commit | 4d724deba3ccd281f169cfb2fd31303181090e52 (patch) | |
tree | f7cc200f825357b92badf95231c38d6956d2a128 | |
parent | 1aac863df0108dd77b32a9602fdf91dad61fa81c (diff) | |
download | SponsorBlock-4d724deba3ccd281f169cfb2fd31303181090e52.tar.gz SponsorBlock-4d724deba3ccd281f169cfb2fd31303181090e52.zip |
Add title text and hide on downvote
-rw-r--r-- | public/_locales/en/messages.json | 3 | ||||
-rw-r--r-- | src/components/CategoryPillComponent.tsx | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index 7066e5f7..d7855a69 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -744,6 +744,9 @@ "fullVideoTooltipWarning": { "message": "This segment is large. If the whole video is about one topic, then change from \"Skip\" to \"Full Video\". See the guidelines for more information." }, + "categoryPillTitleText": { + "message": "This entire video is labeled as this category and is too tightly integrated to be able to separate" + }, "experiementOptOut": { "message": "Opt-out of all future experiments", "description": "This is used in a popup about a new experiment to get a list of unlisted videos to back up since all unlisted videos uploaded before 2017 will be set to private." diff --git a/src/components/CategoryPillComponent.tsx b/src/components/CategoryPillComponent.tsx index 7b760b1f..abe6aaf0 100644 --- a/src/components/CategoryPillComponent.tsx +++ b/src/components/CategoryPillComponent.tsx @@ -40,6 +40,7 @@ class CategoryPillComponent extends React.Component<CategoryPillProps, CategoryP return ( <span style={style} className={"sponsorBlockCategoryPill"} + title={chrome.i18n.getMessage("categoryPillTitleText")} onClick={() => this.state.show && this.setState({ open: !this.state.open })}> <span className="sponsorBlockCategoryPillTitleSection"> <img className="sponsorSkipLogo sponsorSkipObject" @@ -83,7 +84,10 @@ class CategoryPillComponent extends React.Component<CategoryPillProps, CategoryP await stopAnimation(); if (response.successType == 1 || (response.successType == -1 && response.statusCode == 429)) { - this.setState({ open: false }); + this.setState({ + open: false, + show: type === 1 + }); } else if (response.statusCode !== 403) { alert(GenericUtils.getErrorMessage(response.statusCode, response.responseText)); } |