|
1 | 1 | // ==UserScript== |
2 | 2 | // @name YouTube™ Classic 📺 — (Remove rounded design + Return YouTube dislikes) |
3 | | -// @version 2026.1.17.16 |
| 3 | +// @version 2026.1.17.17 |
4 | 4 | // @author Adam Lui, Magma_Craft, Anarios, JRWR, Fuim & hoothin |
5 | 5 | // @namespace https://github.com/adamlui |
6 | 6 | // @description Reverts YouTube to its classic design (before all the rounded corners & hidden dislikes) + redirects YouTube Shorts |
|
574 | 574 | delete run.emoji |
575 | 575 | delete run.loggingDirectives |
576 | 576 | } |
577 | | - } catch(err) {} |
| 577 | + } catch (err) {} |
578 | 578 | } |
579 | 579 | return comment |
580 | 580 | } |
|
597 | 597 | try { |
598 | 598 | creatorName = replies.viewRepliesCreatorThumbnail.accessibility.accessibilityData.label |
599 | 599 | delete replies.viewRepliesCreatorThumbnail |
600 | | - } catch(err) {} |
| 600 | + } catch (err) {} |
601 | 601 | let replyCount = getSimpleString(replies.viewReplies.buttonRenderer.text) |
602 | 602 | replyCount = +replyCount.replace(getString('replyCountIsolator', hl), '') |
603 | 603 | const viewMultiString = creatorName ? 'viewMultiOwner' : 'viewMulti', |
|
611 | 611 | replies.hideReplies.buttonRenderer.text = { |
612 | 612 | runs: [{ text: (replyCount > 1) ? getString('hideMulti', hl) : getString('hideSingular', hl) }] |
613 | 613 | } |
614 | | - } catch(err) {} |
| 614 | + } catch (err) {} |
615 | 615 | return thread |
616 | 616 | } |
617 | 617 | function refreshData(element) { |
|
1893 | 1893 | const likesStr = likeBtn.getAttribute('aria-label').replace(/\D/g, '') |
1894 | 1894 | return likesStr.length ? parseInt(likesStr) : null |
1895 | 1895 | } |
1896 | | - catch { return null } |
| 1896 | + catch (err) { return null } |
1897 | 1897 | } |
1898 | 1898 |
|
1899 | 1899 | function createRateBar(likes, dislikes) { |
|
2117 | 2117 | ?.find((n) => n?.getAttribute('href')?.includes('?locale=')) |
2118 | 2118 | ?.getAttribute('href') |
2119 | 2119 | )?.searchParams?.get('locale') |
2120 | | - } catch { |
| 2120 | + } catch (err) { |
2121 | 2121 | cLog('Cannot find browser locale. Use en as default for number formatting.') |
2122 | 2122 | userLocales = 'en' |
2123 | 2123 | } |
|
2179 | 2179 | buttons.children[1].addEventListener('click', dislikeClicked) |
2180 | 2180 | buttons.children[0].addEventListener('touchstart', likeClicked) |
2181 | 2181 | buttons.children[1].addEventListener('touchstart', dislikeClicked) |
2182 | | - } catch { return } |
| 2182 | + } catch (err) { return } |
2183 | 2183 | unsafeWindow.returnDislikeButtonlistenersSet = true |
2184 | 2184 | } |
2185 | 2185 | setInitialState() |
|
0 commit comments