Skip to content

Commit b6f2696

Browse files
committed
Condensed YTP.setPlyrFlags() early return condition ↞ [auto-sync from https://github.com/adamlui/youtube-classic]
1 parent 130d043 commit b6f2696

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

youtube-classic/youtube-classic.user.js

Lines changed: 2 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 2026.1.17.18
3+
// @version 2026.1.17.19
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
@@ -419,8 +419,7 @@
419419
return response
420420
}
421421
static setPlyrFlags(flags) {
422-
if (!unsafeWindow.yt || !unsafeWindow.yt.config_ || !unsafeWindow.yt.config_.WEB_PLAYER_CONTEXT_CONFIGS)
423-
return
422+
if (!unsafeWindow.yt?.config_?.WEB_PLAYER_CONTEXT_CONFIGS) return
424423
const conCfgs = unsafeWindow.yt.config_.WEB_PLAYER_CONTEXT_CONFIGS
425424
if (!('WEB_PLAYER_CONTEXT_CONFIGS' in this._config)) this._config.WEB_PLAYER_CONTEXT_CONFIGS = {}
426425
for (const cfg in conCfgs) {

0 commit comments

Comments
 (0)