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

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