Skip to content

Commit 1d8927b

Browse files
committed
Merged return conditions in YTP.setPlyrFlags() ↞ [auto-sync from https://github.com/adamlui/youtube-classic]
1 parent 83e43a3 commit 1d8927b

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

youtube-classic/youtube-classic.user.js

Lines changed: 3 additions & 4 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.13
3+
// @version 2026.1.17.14
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,9 +419,8 @@
419419
return response
420420
}
421421
static setPlyrFlags(flags) {
422-
if (!unsafeWindow.yt) return
423-
if (!unsafeWindow.yt.config_) return
424-
if (!unsafeWindow.yt.config_.WEB_PLAYER_CONTEXT_CONFIGS) return
422+
if (!unsafeWindow.yt || !unsafeWindow.yt.config_ || !unsafeWindow.yt.config_.WEB_PLAYER_CONTEXT_CONFIGS)
423+
return
425424
const conCfgs = unsafeWindow.yt.config_.WEB_PLAYER_CONTEXT_CONFIGS
426425
if (!('WEB_PLAYER_CONTEXT_CONFIGS' in this._config)) this._config.WEB_PLAYER_CONTEXT_CONFIGS = {}
427426
for (const cfg in conCfgs) {

0 commit comments

Comments
 (0)