return-youtube-dislike icon indicating copy to clipboard operation
return-youtube-dislike copied to clipboard

SaveFrom conflict

Open SuperZombi opened this issue 2 years ago • 8 comments

Browser

Google Chrome

Browser Version

105.0.5195.127

Extension or Userscript?

Extension

Extension/Userscript Version

3.0.0.6

Video link where you see the problem

https://www.youtube.com/watch?v=* (ALL)

What happened?

After the redesign of YouTube, the extension began to conflict with SaveFromNet (the number of dislikes is displayed instead of likes). image

How to reproduce/recreate?

Install UserScript SaveFromNetHelper

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

Yes

SuperZombi avatar Oct 08 '22 14:10 SuperZombi

I think I've figured out what's going on here.

  1. The dislikes being shown in place of likes is caused by how getLikeButton() and getDislikeButton() functions get like/dislike elements. To be exact, it's caused by them accessing the first child (children[0]) of the element returned by getButtons(). This makes the getLikeTextContainer() and getDislikeTextContainer() functions (as they use the above mentioned functions) target the incorrect elements when trying to set like/dislike numbers. This could be fixed by something like this:
function getLikeButton() {
  const segmentedLikeButton = getButtons().getElementsByTagName(
    "ytd-segmented-like-dislike-button-renderer"
  )[0]?.children[0];
  return segmentedLikeButton !== null
    ? segmentedLikeButton
    : getButtons().children[0];
}

function getDislikeButton() {
  const segmentedDislikeButton = getButtons().getElementsByTagName(
    "ytd-segmented-like-dislike-button-renderer"
  )[0]?.children[1];
  return segmentedDislikeButton !== null
    ? segmentedDislikeButton
    : getButtons().children[1];
}
  1. The like/dislike ratio bar offset is caused by the #actions element stretching. This is similar to what was happening in issue #733. Unfortunately, the fix I implemented for it (in this PR) didn't account for elements being added by other extensions. A solution to this would be combining the fix in my PR with putting both ytd-segmented-like-dislike-button-renderer and ryd-tooltip elements in to a <div> with maring-right: 8px (to fix the gap between like/dislike and share buttons).

Still, these need a bit more testing before implementation.


Resources

ErykDarnowski avatar Oct 09 '22 20:10 ErykDarnowski

I confirm. There is a problem. Is it planned to be fixed? Really needed.

dynoChris avatar Nov 20 '22 14:11 dynoChris

Same scenario for competitor Y2mate extension, which causing same issue.

VetaLioSTV avatar Nov 24 '22 23:11 VetaLioSTV

i hope you find a solution for fix this bug

ronny941 avatar Nov 26 '22 23:11 ronny941

in the settings of savefrom you can remove the download for youtube and then the extension works again

settings

ronny941 avatar Nov 26 '22 23:11 ronny941

on chrome brave and edge it's not necessary because the download from youtube is blocked on the chromium browsers by google only on firefox this extension works with youtube and you can download from it by using this extension

ronny941 avatar Nov 26 '22 23:11 ronny941

Hey @ronny941, you don't need to add any more info! I'm pretty sure I have enough information to implement a fix 😄

Just give me a bit more time!

ErykDarnowski avatar Nov 27 '22 13:11 ErykDarnowski

ok i understand sorry

ronny941 avatar Nov 27 '22 16:11 ronny941