Skip to content

Commit ce5a202

Browse files
committed
Moved extractSelectors def to functions section
1 parent b0e5f23 commit ce5a202

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

youtube-classic/youtube-classic.user.js

Lines changed: 4 additions & 3 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 2025.10.18.2
3+
// @version 2025.10.18.3
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
@@ -242,6 +242,9 @@
242242
return notificationDiv
243243
}
244244

245+
function extractSelectors(obj) {
246+
return Object.values(obj).flatMap(val => typeof val == 'object' ? extractSelectors(val) : val) }
247+
245248
const toolbarMenu = {
246249
state: {
247250
symbols: ['❌', '✔️'], separator: env.scriptManager.name == 'Tampermonkey' ? ' — ' : ': ',
@@ -2241,7 +2244,5 @@
22412244
.map(([key, selectors]) => !config[`${key}Block`] ? ''
22422245
: `${extractSelectors(selectors).join(',')} { display: none }`
22432246
).join('')
2244-
function extractSelectors(obj) {
2245-
return Object.values(obj).flatMap(val => typeof val == 'object' ? extractSelectors(val) : val) }
22462247

22472248
})()

0 commit comments

Comments
 (0)