소스 검색

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
Aneimytis 3 년 전
부모
커밋
df742d0566
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Extensions/combined/src/state.js

+ 1 - 1
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;