Skip to content

Commit 6aef5ad

Browse files
committed
Condensed lines ↞ [auto-sync from https://github.com/adamlui/youtube-classic]
1 parent 47925c0 commit 6aef5ad

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

youtube-classic/youtube-classic.user.js

Lines changed: 4 additions & 8 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.20.7
3+
// @version 2026.1.20.8
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
@@ -1185,21 +1185,17 @@
11851185
} else if (locationPath == '/') { // remove regenerating homepage stuff
11861186
if (config.adBlock) // remove ads
11871187
document.querySelector('ytd-ad-slot-renderer')?.closest('[rendered-from-rich-grid]')?.remove()
1188-
if (config.shortsBlock || config.playablesBlock) { // remove shelves
1188+
if (config.shortsBlock || config.playablesBlock) // remove shelves
11891189
document.querySelector(
11901190
`ytd-rich-section-renderer${ !config.shortsBlock ? ':not(:has(a[href*="/shorts/"]))' : '' }${
11911191
!config.playablesBlock ? ':not(:has(a[href*="/playables/"]))' : '' }`
11921192
)?.remove()
1193-
}
11941193
}
11951194
})
11961195
getLoadedElem('html').then(() => homeObserver.observe(document.documentElement, obsConfig))
11971196

11981197
// Block stuff
11991198
document.head.append(window.configStyle ??= document.createElement('style'))
1200-
window.configStyle.textContent = Object.entries(domSelectors)
1201-
.map(([key, selectors]) => !config[`${key}Block`] ? ''
1202-
: `${extractSelectors(selectors).join(',')} { display: none }`
1203-
).join('')
1204-
1199+
window.configStyle.textContent = Object.entries(domSelectors).map(([key, selectors]) =>
1200+
!config[`${key}Block`] ? '' : `${extractSelectors(selectors).join(',')} { display: none }`).join('')
12051201
})()

0 commit comments

Comments
 (0)