Commit 6a5edf5
authored
Fix repeating dislike count issue on YouTube
Description:
This pull request fixes an issue where the dislike count on YouTube videos was being repeated multiple times, leading to incorrect display and a poor user experience.
Problem:
The dislike count was being updated and displayed repeatedly, which resulted in the same number being shown multiple times in a row.
This issue also caused the "dislike" button to become unresponsive in some cases, preventing users from interacting with it.
Solution:
I adjusted the makeUI function to check whether the dislike count element already exists before updating it. This ensures that the UI is only updated when necessary, preventing the issue of repeated display.
Added a check to ensure that the text content is only updated if it has changed, which further optimizes performance and prevents unnecessary UI updates.
Testing:
I tested this solution on both regular YouTube videos and YouTube Shorts to ensure that the dislike count is displayed correctly and updated only when necessary.
The "dislike" button remains fully functional after these changes.
Please review the changes and let me know if there are any further adjustments needed. Thank you for your consideration!1 parent 870e04e commit 6a5edf5
1 file changed
+16
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
65 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
66 | 70 | | |
67 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
68 | 78 | | |
69 | 79 | | |
70 | 80 | | |
71 | 81 | | |
72 | 82 | | |
| 83 | + | |
73 | 84 | | |
74 | 85 | | |
75 | 86 | | |
76 | 87 | | |
77 | 88 | | |
78 | 89 | | |
79 | 90 | | |
80 | | - | |
| 91 | + | |
81 | 92 | | |
82 | 93 | | |
83 | 94 | | |
| |||
94 | 105 | | |
95 | 106 | | |
96 | 107 | | |
97 | | - | |
| 108 | + | |
98 | 109 | | |
99 | | - | |
| 110 | + | |
100 | 111 | | |
101 | 112 | | |
102 | 113 | | |
| |||
124 | 135 | | |
125 | 136 | | |
126 | 137 | | |
127 | | - | |
128 | 138 | | |
129 | 139 | | |
130 | 140 | | |
| |||
0 commit comments