Skip to content

Commit d7444ad

Browse files
committed
Condensed getColorFromTheme() ↞ [auto-sync from https://github.com/adamlui/youtube-classic]
1 parent 7964a13 commit d7444ad

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

youtube-classic/youtube-classic.user.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name YouTube™ Classic 📺 — (Remove rounded design + Return YouTube dislikes)
3-
// @version 2026.1.17.20
3+
// @version 2026.1.17.21
44
// @author Adam Lui, Magma_Craft, Anarios, JRWR, Fuim & hoothin
55
// @namespace https://github.com/adamlui
66
// @description Reverts YouTube to its classic design (before all the rounded corners & hidden dislikes) + redirects YouTube Shorts
@@ -2142,20 +2142,14 @@
21422142
let colorString
21432143
switch (extConfig.colorTheme) {
21442144
case 'accessible':
2145-
if (voteIsLike == true) {
2146-
colorString = 'dodgerblue'
2147-
} else { colorString = 'gold' }
2145+
colorString = voteIsLike ? 'dodgerblue' : 'gold'
21482146
break
21492147
case 'neon':
2150-
if (voteIsLike == true) {
2151-
colorString = 'aqua'
2152-
} else { colorString = 'magenta' }
2148+
colorString = voteIsLike ? 'aqua' : 'magenta'
21532149
break
21542150
case 'classic':
21552151
default:
2156-
if (voteIsLike == true) {
2157-
colorString = 'lime'
2158-
} else { colorString = 'red' }
2152+
colorString = voteIsLike ? 'lime' : 'red'
21592153
}
21602154
return colorString
21612155
}

0 commit comments

Comments
 (0)