Skip to content

Commit 39a9167

Browse files
committed
Moved localStorage.notifyProps init into cjsNotify() ↞ [auto-sync from https://github.com/adamlui/youtube-classic]
1 parent 30c81f8 commit 39a9167

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.21.10
3+
// @version 2026.1.21.11
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
@@ -32,8 +32,6 @@
3232
(() => {
3333
'use strict'
3434

35-
localStorage.notifyProps = JSON.stringify({ queue: { topRight: [], bottomRight: [], bottomLeft: [], topLeft: [] }})
36-
3735
const env = {
3836
scriptManager: {
3937
name: (() => { try { return GM_info.scriptHandler } catch (err) { return 'unknown' }})(),
@@ -239,7 +237,8 @@
239237
}
240238

241239
// Enqueue notification
242-
let notifyProps = JSON.parse(localStorage.notifyProps)
240+
let notifyProps = JSON.parse(localStorage.notifyProps
241+
??= JSON.stringify({ queue: { topRight: [], bottomRight: [], bottomLeft: [], topLeft: [] }}))
243242
notifyProps.queue[notificationDiv.quadrant].push(notificationDiv.id)
244243
localStorage.notifyProps = JSON.stringify(notifyProps)
245244

0 commit comments

Comments
 (0)