mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 01:01:55 +01:00
Add title text and hide on downvote
This commit is contained in:
parent
1aac863df0
commit
4d724deba3
2 changed files with 8 additions and 1 deletions
|
@ -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."
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue