Anarios / return-youtube-dislike

Chrome extension to return youtube dislikes
https://returnyoutubedislike.com/
GNU General Public License v3.0
12.34k stars 548 forks source link

Dislikes are going to the share tab when logged into an account. #998

Closed GladistonXD closed 7 months ago

GladistonXD commented 7 months ago

Have you tried to find similar open issues?

Browser

Chrome

Browser Version

118.0.5993.88

Extension or Userscript?

Extension

Extension/Userscript Version

3.0.0.12

Video link where you see the problem

All links

What happened?

Whenever I'm logged into an account this happens, apparently the information that was supposed to go to the dislike button ends up in the sharing tab.

image

How to reproduce/recreate?

Login.

Will you be available for follow-up questions to help developers diagnose & fix the issue?

Yes

tendan commented 7 months ago

I can confirm that issue also occurs on Firefox 120.0b9. Furthermore, the number on it increases when you click share button. I really thought that YouTube added share counting...

icynstant commented 7 months ago

Please do not create duplicates, #993

GladistonXD commented 7 months ago

Please do not create duplicates, #993

It doesn't explain that the reason is to be logged into the account, the button changes when you log in, hence the error, so theoretically it is not a duplicate.

UnderscoreAngel commented 7 months ago

It doesn't explain that the reason is to be logged into the account, the button changes when you log in, hence the error, so theoretically it is not a duplicate.

this happens because the account has the flag experiment that enables it, YouTube has a test system where they roll out new experiments on random user accounts, if you get unlucky they roll it out to a few accounts first before rolling it out to everyone, and you can be one of those.

therefor it is a duplicate.

GladistonXD commented 7 months ago

I myself made a correction to the code using xpath to ensure that even if a button changes location or has a similar button it always goes to the dislike button, I will send an implementation note to the developer.

UnderscoreAngel commented 7 months ago

I myself made a correction to the code using xpath to ensure that even if a button changes location or has a similar button it always goes to the dislike button, I will send an implementation note to the developer.

yeah, i'm sure this issue was caused because YouTube changed their buttons to "view-models" on their experiment, since the dislike counter isn't supposed to work with them, they just appear next to the share counter because it's the only button that doesn't use the whole "view-model" thing.

GladistonXD commented 7 months ago

I made this very rough correction, but it works both logged in and out.

function getDislikeButton() {
  return document.querySelector("#segmented-dislike-button, #dislike-button, dislike-button-view-model");
}

function getLikeButton() {
  return document.querySelector("#segmented-like-button, #like-button, like-button-view-model");
}
UnderscoreAngel commented 7 months ago

I made this very rough correction, but it works both logged in and out.

function getDislikeButton() {
  return document.querySelector("#segmented-dislike-button, dislike-button-view-model");
}

function getLikeButton() {
  return document.querySelector("#segmented-like-button, like-button-view-model");
}

amazing, thanks for the temp fix!

hiddenmask58 commented 7 months ago

I made this very rough correction, but it works both logged in and out.

function getDislikeButton() {
  return document.querySelector("#segmented-dislike-button, #dislike-button, dislike-button-view-model");
}

function getLikeButton() {
  return document.querySelector("#segmented-like-button, #like-button, like-button-view-model");
}

how to use this?

UnderscoreAngel commented 7 months ago

I made this very rough correction, but it works both logged in and out.

function getDislikeButton() {
  return document.querySelector("#segmented-dislike-button, #dislike-button, dislike-button-view-model");
}

function getLikeButton() {
  return document.querySelector("#segmented-like-button, #like-button, like-button-view-model");
}

hey, i wasn't able to get this working on a userscript sheet am i doing something wrong?

GladistonXD commented 7 months ago

how to use this?

Edit the ryd.content-script.js file by replacing the getDislikeButton() and getLikeButton() functions and update the extension through the manager or restart the browser.

GladistonXD commented 7 months ago

hey, i wasn't able to get this working on a userscript sheet am i doing something wrong?

What is userscript sheet? You can test whether the button was found by playing document.querySelector("#segmented-dislike-button, #dislike-button, dislike-button-view-model"); in the browser console.