diff options
author | FlorianZahn <[email protected]> | 2021-10-15 21:01:32 +0200 |
---|---|---|
committer | FlorianZahn <[email protected]> | 2021-10-15 21:01:32 +0200 |
commit | 8aea74160c1a596a608207b66ffbcb39cf2ae38a (patch) | |
tree | f2b59cfbbbaff5295542b63abc359a964d1dd9fb | |
parent | d375a97e996431963b569fa7d5f5cf6a0dd29abc (diff) | |
download | SponsorBlock-8aea74160c1a596a608207b66ffbcb39cf2ae38a.tar.gz SponsorBlock-8aea74160c1a596a608207b66ffbcb39cf2ae38a.zip |
only change color if user isVip
-rw-r--r-- | src/popup.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/popup.ts b/src/popup.ts index 2cdbab04..5a75c8ba 100644 --- a/src/popup.ts +++ b/src/popup.ts @@ -379,6 +379,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> { container.removeChild(container.firstChild); } + const isVip = Config.config.isVip; for (let i = 0; i < segmentTimes.length; i++) { const UUID = segmentTimes[i].UUID; const locked = segmentTimes[i].locked; @@ -431,7 +432,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> { const downvoteButton = document.createElement("img"); downvoteButton.id = "sponsorTimesDownvoteButtonsContainer" + UUID; downvoteButton.className = "voteButton"; - downvoteButton.src = locked ? chrome.runtime.getURL("icons/thumbs_down_locked.svg") : chrome.runtime.getURL("icons/thumbs_down.svg"); + downvoteButton.src = locked && isVip ? chrome.runtime.getURL("icons/thumbs_down_locked.svg") : chrome.runtime.getURL("icons/thumbs_down.svg"); downvoteButton.addEventListener("click", () => vote(0, UUID)); //uuid button |