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

Make It Work With Youtube Watch Page Fix Or Youtube Proper Description Script #735

Open
TheBSODAndWSODFan opened this issue Aug 26, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@TheBSODAndWSODFan
Copy link

TheBSODAndWSODFan commented Aug 26, 2022

Extension or Userscript?

Extension

Request or suggest a new feature!

https://youtu.be/N1h5ARS0uEw

When I Switching Account, The Like/DIslike Bar Is Missing When Youtube Watch Page FIx Script is enabled. That's Because My Second Account Has New Youtube Layout And I Personally Don't Like New Layout. And Enhancer For Youtube Extension Is Odd

Browser: Chromium Version 104.0.5112.101 (Official Build) for Linux Mint (64-bit)
RYD Extension Version: 3.0.0.5
Youtube Watch Page Fix Script: https://greasyfork.org/en/scripts/445015-youtube-watch-page-fix Or Youtube Proper Description Script: https://greasyfork.org/en/scripts/440613-youtube-proper-description

Extension Enabled:
Improve YouTube 3.9.46
enhanced-h264ify 2.1.0
Enhancer for YouTube 2.0.115.1
Return YouTube Dislike 3.0.0.5
Tampermonkey 4.16.1
YouTube Redux 2.13.3

Sorry For Bad English And Sorry If This Issue Is Duplicate.

Ways to implement this!

Add A Toggle Switch For Make It Work With Youtube Watch Page Fix Or Youtube Proper Description Script (Disabled By Default)

Can you work on this?

Yes

Will you be available for follow-up questions to help developers implement this?

Yes

@TheBSODAndWSODFan TheBSODAndWSODFan added the enhancement New feature or request label Aug 26, 2022
@PickleNik PickleNik pinned this issue Aug 29, 2022
@JunkiEDM
Copy link

JunkiEDM commented Sep 14, 2023

I use the Youtube Proper Description userscript and found that adding

if (document.getElementsByTagName('ytd-watch-metadata').length > 0) {
    document.getElementsByTagName('ytd-watch-metadata')[0].remove()
}

at the end of the async function at the bottom of the script (screenshot below) fixes the issue for me. Haven't tested it too thoroughly but doesn't seem have broken anything.

screenshot

image

For RYD devs

After skimming through and comparing the two, it seems like the issue stems from Youtube Proper Description (maybe watch page fix too?) cloning elements from the ytd-watch-metadata section (area below the video player including title & description), and simply hiding the original section with display: none instead of removing the element from the DOM. This means there are two dislike buttons in the DOM, but only one is visible, and the hidden one is the one RYD is targeting.

A possible fix for this in RYD (Using the UserScript version of RYD for reference) would involve changing querySelectors in the getButtons() function to querySelectorAll, and adjusting functions using getButtons() to expect an array of elements to act on instead of a single one. This would ensure that if there's more than one dislike button, all of them would display the dislike count from RYD.

Note that I'm only accounting for the button container and dislike count display here, anything else like the like/dislike ratio bar would need its own similar adjustments.

@Anarios Anarios unpinned this issue Oct 13, 2023
JunkiEDM added a commit to JunkiEDM/return-youtube-dislike that referenced this issue Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants