fix dislike text box not being found for some users

This commit is contained in:
sh4dow committed 2022-08-01 21:49:35 +02:00
1 parent dfa541ad1c
commit 596c0d730c
3 files changed
+37 -8

No files matched your search

+16 -1
View File
@@ -36,10 +36,25 @@ function getLikeButton() {
return getButtons().children[0];
}
function getLikeTextContainer() {
return (
getLikeButton().querySelector("#text") ??
getLikeButton().getElementsByTagName("yt-formatted-string")[0]
);
}
function getDislikeButton() {
return getButtons().children[1];
}
function getDislikeTextContainer() {
return (
getDislikeButton().querySelector("#text") ??
getDislikeButton().getElementsByTagName("yt-formatted-string")[0]
);
}
function checkForSignInButton() {
if (
document.querySelector(
@@ -52,4 +67,4 @@ function checkForSignInButton() {
}
}
export { getButtons, getLikeButton, getDislikeButton, checkForSignInButton };
export { getButtons, getLikeButton, getDislikeButton, getLikeTextContainer, getDislikeTextContainer, checkForSignInButton };