From 97b6e0ee42171353af0c1b8e22de9abfcaa4e02b Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Wed, 9 Jun 2021 13:31:26 -0400 Subject: [PATCH] Change variable names --- src/js-components/previewBar.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js-components/previewBar.ts b/src/js-components/previewBar.ts index 0235727e..14fde89f 100644 --- a/src/js-components/previewBar.ts +++ b/src/js-components/previewBar.ts @@ -179,12 +179,12 @@ class PreviewBar { bar.classList.add('previewbar'); bar.innerHTML = ' '; - const barSegmentType = (preview ? 'preview-' : '') + category; + const fullCategoryName = (preview ? 'preview-' : '') + category; - bar.setAttribute('data-vs-segment-type', barSegmentType); + bar.setAttribute('sponsorblock-category', fullCategoryName); - bar.style.backgroundColor = Config.config.barTypes[barSegmentType]?.color; - if (!this.onMobileYouTube) bar.style.opacity = Config.config.barTypes[barSegmentType]?.opacity; + bar.style.backgroundColor = Config.config.barTypes[fullCategoryName]?.color; + if (!this.onMobileYouTube) bar.style.opacity = Config.config.barTypes[fullCategoryName]?.opacity; bar.style.position = "absolute"; bar.style.width = this.timeToPercentage(segment[1] - segment[0]);