From df742d05664624d920ed2ddc6088b6ece6460970 Mon Sep 17 00:00:00 2001 From: Aneimytis <5927301+cyrildtm@users.noreply.github.com> Date: Sun, 8 May 2022 05:40:20 -0500 Subject: [PATCH] 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 --- Extensions/combined/src/state.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extensions/combined/src/state.js b/Extensions/combined/src/state.js index df9d561..0b987c1 100644 --- a/Extensions/combined/src/state.js +++ b/Extensions/combined/src/state.js @@ -153,7 +153,7 @@ function getLikeCountFromButton() { return 0; } let likesStr = getLikeButton() - .querySelector("button") + .querySelector("yt-formatted-string#text") .getAttribute("aria-label") .replace(/\D/g, ""); return likesStr.length > 0 ? parseInt(likesStr) : false;