Skip to content

Commit f4a9ffc

Browse files
committed
Simplified YTP.onNewScript() ↞ [auto-sync from https://github.com/adamlui/youtube-classic]
1 parent 9de2de8 commit f4a9ffc

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

youtube-classic/youtube-classic.user.js

Lines changed: 2 additions & 5 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.2
3+
// @version 2026.1.17.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
@@ -386,10 +386,7 @@
386386
}
387387
return this.mergeDeep(target, ...sources);
388388
}
389-
static onNewScript(mutations) {
390-
for (const mut of mutations) for (const node of mut.addedNodes) // eslint-disable-line no-unused-vars
391-
YTP.bruteforce()
392-
}
389+
static onNewScript(mutations) { if (mutations.some(mut => mut.addedNodes.length)) YTP.bruteforce() }
393390
static start() { this.observer.observe(document, {childList: true, subtree: true}); }
394391
static stop() { this.observer.disconnect(); }
395392
static bruteforce() {

0 commit comments

Comments
 (0)