|
@@ -91,11 +91,11 @@ function isVideoNotDisliked() {
|
|
return getDislikeButton().classList.contains("style-text");
|
|
return getDislikeButton().classList.contains("style-text");
|
|
}
|
|
}
|
|
|
|
|
|
-function checkForSignInButton() {
|
|
|
|
|
|
+function checkForUserAvatarButton() {
|
|
if (isMobile) {
|
|
if (isMobile) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (document.querySelector('[aria-label="Sign in"]')) {
|
|
|
|
|
|
+ if (document.querySelector('#avatar-btn')) {
|
|
return true
|
|
return true
|
|
} else {
|
|
} else {
|
|
return false
|
|
return false
|
|
@@ -278,7 +278,7 @@ function setState() {
|
|
}
|
|
}
|
|
|
|
|
|
function likeClicked() {
|
|
function likeClicked() {
|
|
- if (checkForSignInButton() == false) {
|
|
|
|
|
|
+ if (checkForUserAvatarButton() == true) {
|
|
if (previousState == 1) {
|
|
if (previousState == 1) {
|
|
likesvalue--;
|
|
likesvalue--;
|
|
createRateBar(likesvalue, dislikesvalue);
|
|
createRateBar(likesvalue, dislikesvalue);
|
|
@@ -299,7 +299,7 @@ function likeClicked() {
|
|
}
|
|
}
|
|
|
|
|
|
function dislikeClicked() {
|
|
function dislikeClicked() {
|
|
- if (checkForSignInButton() == false) {
|
|
|
|
|
|
+ if (checkForUserAvatarButton() == true) {
|
|
if (previousState == 3) {
|
|
if (previousState == 3) {
|
|
dislikesvalue++;
|
|
dislikesvalue++;
|
|
setDislikes(numberFormat(dislikesvalue));
|
|
setDislikes(numberFormat(dislikesvalue));
|