Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working in Firefox when logged in to YouTube #43

Closed
R3G3N3R4T0R opened this issue Jun 23, 2023 · 4 comments
Closed

Not working in Firefox when logged in to YouTube #43

R3G3N3R4T0R opened this issue Jun 23, 2023 · 4 comments

Comments

@R3G3N3R4T0R
Copy link

R3G3N3R4T0R commented Jun 23, 2023

The script does not work when logged in and using Firefox. It works fine in Chromium-based browsers.
The culprit is querySelector from the function rewriteCommentNameFromContinuationItems

const commentRenderer = commentElem?.querySelector(
  "ytd-comment-renderer"
);

Debugger Logged Out
image
Debugger Logged In
image
HTML Logged In
image

These are from the same link, one successfully selected ytd-comment-renderer from ytd-comment-thread-renderer and another failed to do so. And ytd-comment-renderer does exist in the logged in version.

CY Fung's alternative implementation also has the same issue. I haven't debugged his but also no request for username when logged in so likely the same problem.

Versions Tested

  • v0.3.2.1 to v0.3.4 (Firefox 114.0.2/TamperMonkey v4.18.1)
  • V0.3.4 (Firefox 114.0.2/ViolentMonkey v2.14.0)
  • v0.3.4 (Librewolf 110.0.1/ViolentMonkey v2.14.0)
@yakisova41
Copy link
Owner

Am I correct that ytd-comment-renderer is null when I am logged into my Google account?🤨
It is working fine in my Firefox, so I would like to know the detailed procedure to reproduce it.

@R3G3N3R4T0R
Copy link
Author

R3G3N3R4T0R commented Jun 24, 2023

No, ytd-comment-renderer is not null when logged in if the tag is what you are referring to. it is just that the commentElem.querySelector("ytd-comment-renderer") method returned null when logged in. The only difference between logged in and logged out is the HTML for the like/dislike buttons, reply box, and the more/less reply buttons.

It appears that both my main and alt are affected so if anything differs between our systems it could be a regional issue. YouTube did not use handles when logged in, only when logged out until a few days ago for me.

Step to reproduce it is as such:

  1. Create a new profile in Firefox, load in TamperMonkey/ViolentMonkey and your script from GreasyFork.
  2. open www.youtube.com and pick a video.
  3. scroll down and YouTube comments should have usernames
  4. Log in to YouTube, and return to the same video
  5. scroll down and YouTube comments should have handles.

@yakisova41
Copy link
Owner

We have identified the cause and have released a fixed version v0.3.5.
Please update it.

@R3G3N3R4T0R
Copy link
Author

Can confirm it is fixed. Thanks for the quick response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants