mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-12-03 19:31:20 +01:00
Get the like number from proper place
When like button is clicked, only one of the two aria-label attributes gets updated. Use the correct one to reflect latest like count. Affects user option "re-format like numbers" Attn #561
This commit is contained in:
1 parent
17c9af130a
commit
df742d0566
1 file changed
+1
-1
@@ -153,7 +153,7 @@ function getLikeCountFromButton() {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
let likesStr = getLikeButton()
|
let likesStr = getLikeButton()
|
||||||
.querySelector("button")
|
.querySelector("yt-formatted-string#text")
|
||||||
.getAttribute("aria-label")
|
.getAttribute("aria-label")
|
||||||
.replace(/\D/g, "");
|
.replace(/\D/g, "");
|
||||||
return likesStr.length > 0 ? parseInt(likesStr) : false;
|
return likesStr.length > 0 ? parseInt(likesStr) : false;
|
||||||
|
|||||||
Reference in new issue
Block a user