Add title text and hide on downvote

This commit is contained in:
Ajay 2022-01-06 02:06:55 -05:00
parent 1aac863df0
commit 4d724deba3
2 changed files with 8 additions and 1 deletions

View file

@ -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."

View file

@ -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));
}