Skip to content

Commit e6037a9

Browse files
committed
Moved app.config init out of settings ↞ [auto-sync from https://github.com/adamlui/youtube-classic]
1 parent 6ebdbed commit e6037a9

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.26.1
3+
// @version 2026.1.27
44
// @author Adam Lui, Magma_Craft, 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
@@ -49,6 +49,7 @@
4949
window.app = { symbol: '📺', configKeyPrefix: 'ytClassic' }
5050

5151
// Init SETTINGS
52+
app.config ??= {}
5253
window.settings = {
5354

5455
controls: { // displays top-to-bottom in toolbar menu
@@ -79,7 +80,6 @@
7980
},
8081

8182
load(...keys) {
82-
app.config ??= {}
8383
keys.flat().forEach(key =>
8484
app.config[key] = processKey(key, GM_getValue(`${app.configKeyPrefix}_${key}`, undefined)))
8585
function processKey(key, val) {
@@ -92,8 +92,7 @@
9292
}
9393
},
9494

95-
save(key, val) {
96-
app.config ??= {} ; GM_setValue(`${app.configKeyPrefix}_${key}`, val) ; app.config[key] = val },
95+
save(key, val) { GM_setValue(`${app.configKeyPrefix}_${key}`, val) ; app.config[key] = val },
9796

9897
typeIsEnabled(key) { // for menu labels + notifs to return ON/OFF
9998
const reInvertSuffixes = /disabled|hidden/i

0 commit comments

Comments
 (0)