mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-11-24 07:13:02 +01:00
fixes signed-in status check
This commit is contained in:
1 parent
ab99ce7046
commit
9c23666d41
3 files changed
+12
-12
No files matched your search
@@ -91,11 +91,11 @@ function isVideoNotDisliked() {
|
||||
return getDislikeButton().classList.contains("style-text");
|
||||
}
|
||||
|
||||
function checkForSignInButton() {
|
||||
function checkForUserAvatarButton() {
|
||||
if (isMobile) {
|
||||
return;
|
||||
}
|
||||
if (document.querySelector('[aria-label="Sign in"]')) {
|
||||
if (document.querySelector('#avatar-btn')) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
@@ -278,7 +278,7 @@ function setState() {
|
||||
}
|
||||
|
||||
function likeClicked() {
|
||||
if (checkForSignInButton() == false) {
|
||||
if (checkForUserAvatarButton() == true) {
|
||||
if (previousState == 1) {
|
||||
likesvalue--;
|
||||
createRateBar(likesvalue, dislikesvalue);
|
||||
@@ -299,7 +299,7 @@ function likeClicked() {
|
||||
}
|
||||
|
||||
function dislikeClicked() {
|
||||
if (checkForSignInButton() == false) {
|
||||
if (checkForUserAvatarButton() == true) {
|
||||
if (previousState == 3) {
|
||||
dislikesvalue++;
|
||||
setDislikes(numberFormat(dislikesvalue));
|
||||
|
||||
Reference in new issue
Block a user