Skip to content

Commit 7382e7f

Browse files
committed
Condensed formatComment(), deleted braces in formatCommentThread() ↞ [auto-sync from https://github.com/adamlui/youtube-classic]
1 parent 0731fc5 commit 7382e7f

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

youtube-classic/youtube-classic.user.js

Lines changed: 4 additions & 11 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.43
3+
// @version 2026.1.17.44
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
@@ -564,21 +564,14 @@
564564
}
565565
function formatComment(comment) {
566566
if (cfconfig.unicodeEmojis) {
567-
let runs
568-
try {
569-
runs = comment.contentText.runs
570-
for (const run of runs) {
571-
delete run.emoji
572-
delete run.loggingDirectives
573-
}
574-
} catch (err) {}
567+
try { for (const run of comment.contentText.runs) { delete run.emoji ; delete run.loggingDirectives }}
568+
catch (err) {}
575569
}
576570
return comment
577571
}
578572
async function formatCommentThread(thread) {
579-
if (thread.comment.commentRenderer) {
573+
if (thread.comment.commentRenderer)
580574
thread.comment.commentRenderer = formatComment(thread.comment.commentRenderer)
581-
}
582575
let replies
583576
try {
584577
replies = thread.replies.commentRepliesRenderer

0 commit comments

Comments
 (0)