Show Full-Video Labels on thumbnails

Co-authored-by: mini-bomba <mini-bomba@users.noreply.github.com>
This commit is contained in:
Ajay
2023-03-10 03:49:01 -05:00
parent 3ace3b9650
commit 758f0b7526
8 changed files with 278 additions and 30 deletions

View File

@@ -331,7 +331,8 @@ class PreviewBar {
const fullCategoryName = (unsubmitted ? 'preview-' : '') + category;
bar.setAttribute('sponsorblock-category', fullCategoryName);
bar.style.backgroundColor = Config.config.barTypes[fullCategoryName]?.color;
// Handled by setCategoryColorCSSVariables() of content.ts
bar.style.backgroundColor = `var(--sb-category-${fullCategoryName})`;
if (!this.onMobileYouTube) bar.style.opacity = Config.config.barTypes[fullCategoryName]?.opacity;
bar.style.position = "absolute";