mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 01:01:55 +01:00
Merge pull request #1711 from mini-bomba/darkreader-proofing-the-fvlabels
Reset fvlabel color definitions when segment == null
This commit is contained in:
commit
7b5303b1d8
1 changed files with 5 additions and 5 deletions
|
@ -43,7 +43,7 @@ class CategoryPillComponent extends React.Component<CategoryPillProps, CategoryP
|
|||
|
||||
return (
|
||||
<span style={style}
|
||||
className={"sponsorBlockCategoryPill"}
|
||||
className={"sponsorBlockCategoryPill"}
|
||||
aria-label={this.getTitleText()}
|
||||
onClick={(e) => this.toggleOpen(e)}
|
||||
onMouseEnter={() => this.openTooltip()}
|
||||
|
@ -104,8 +104,8 @@ 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) {
|
||||
|
@ -117,13 +117,13 @@ class CategoryPillComponent extends React.Component<CategoryPillProps, CategoryP
|
|||
private getColor(): string {
|
||||
// Handled by setCategoryColorCSSVariables() of content.ts
|
||||
const category = this.state.segment?.category;
|
||||
return `var(--sb-category-preview-${category}, var(--sb-category-${category}))`;
|
||||
return category == null ? null : `var(--sb-category-preview-${category}, var(--sb-category-${category}))`;
|
||||
}
|
||||
|
||||
private getTextColor(): string {
|
||||
// Handled by setCategoryColorCSSVariables() of content.ts
|
||||
const category = this.state.segment?.category;
|
||||
return `var(--sb-category-text-preview-${category}, var(--sb-category-text-${category}))`;
|
||||
return category == null ? null : `var(--sb-category-text-preview-${category}, var(--sb-category-text-${category}))`;
|
||||
}
|
||||
|
||||
private openTooltip(): void {
|
||||
|
|
Loading…
Reference in a new issue