Skip to content

Commit 6ae0481

Browse files
committed
Added (err) to catches for compatibility ↞ [auto-sync from https://github.com/adamlui/youtube-classic]
1 parent 920ee13 commit 6ae0481

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

youtube-classic/youtube-classic.user.js

Lines changed: 7 additions & 7 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.16
3+
// @version 2026.1.17.17
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
@@ -574,7 +574,7 @@
574574
delete run.emoji
575575
delete run.loggingDirectives
576576
}
577-
} catch(err) {}
577+
} catch (err) {}
578578
}
579579
return comment
580580
}
@@ -597,7 +597,7 @@
597597
try {
598598
creatorName = replies.viewRepliesCreatorThumbnail.accessibility.accessibilityData.label
599599
delete replies.viewRepliesCreatorThumbnail
600-
} catch(err) {}
600+
} catch (err) {}
601601
let replyCount = getSimpleString(replies.viewReplies.buttonRenderer.text)
602602
replyCount = +replyCount.replace(getString('replyCountIsolator', hl), '')
603603
const viewMultiString = creatorName ? 'viewMultiOwner' : 'viewMulti',
@@ -611,7 +611,7 @@
611611
replies.hideReplies.buttonRenderer.text = {
612612
runs: [{ text: (replyCount > 1) ? getString('hideMulti', hl) : getString('hideSingular', hl) }]
613613
}
614-
} catch(err) {}
614+
} catch (err) {}
615615
return thread
616616
}
617617
function refreshData(element) {
@@ -1893,7 +1893,7 @@
18931893
const likesStr = likeBtn.getAttribute('aria-label').replace(/\D/g, '')
18941894
return likesStr.length ? parseInt(likesStr) : null
18951895
}
1896-
catch { return null }
1896+
catch (err) { return null }
18971897
}
18981898

18991899
function createRateBar(likes, dislikes) {
@@ -2117,7 +2117,7 @@
21172117
?.find((n) => n?.getAttribute('href')?.includes('?locale='))
21182118
?.getAttribute('href')
21192119
)?.searchParams?.get('locale')
2120-
} catch {
2120+
} catch (err) {
21212121
cLog('Cannot find browser locale. Use en as default for number formatting.')
21222122
userLocales = 'en'
21232123
}
@@ -2179,7 +2179,7 @@
21792179
buttons.children[1].addEventListener('click', dislikeClicked)
21802180
buttons.children[0].addEventListener('touchstart', likeClicked)
21812181
buttons.children[1].addEventListener('touchstart', dislikeClicked)
2182-
} catch { return }
2182+
} catch (err) { return }
21832183
unsafeWindow.returnDislikeButtonlistenersSet = true
21842184
}
21852185
setInitialState()

0 commit comments

Comments
 (0)