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

(Bug): No ratio bar showing

Open 3rd3 opened this issue 3 years ago • 8 comments

Browser

Firefox

Browser Version

98.0.2

Extension or Userscript?

Extension

Extension/Userscript Version

latest

Video link where you see the problem

Any

What happened?

For me this extension never shows the ratio bar.

Image

How to reproduce/recreate?

See above.

3rd3 avatar Apr 03 '22 09:04 3rd3

This is due to YouTube's new UI. You are a part of YT's A/B testing. You can try clearing cookies (eventually signing-out of YT).

sy-b avatar Apr 03 '22 16:04 sy-b

Would #495 solve this issue? Is this A/B testing consistent with a particular user? Is there a way to force this? Oh no. It just looks worse.

cyrildtm avatar Apr 20 '22 13:04 cyrildtm

Is there a way to force this?

No, but kind of yes

  1. Wish yourself good luck
  2. Open browser (for this example I'll be using chromium based browser)
  3. Press ctrl + shift + n (chrome) or ctrl + shift + p (Firefox
  4. Visit YoutTube.com
  5. Repeat from step 2 until you get a new YouTube UI

sy-b avatar Apr 20 '22 14:04 sy-b

Nope. Tried twenty times in a row, turned out step 0 didn't work.

I just want some A/B testing victim confirm if the container still exists. Since they have removed the dislike, there is no meaning to keep the ratio bar any more. But if it's still there, we may still use it.

cyrildtm avatar Apr 21 '22 02:04 cyrildtm

Got ratio-bar-less UI on the 6th try. I can share the HTML (in private chat).

sy-b avatar Apr 21 '22 04:04 sy-b

got it on 27th try.

x = document.querySelector('ytd-sentiment-bar-renderer#sentiment');
if (x.hasAttribute('hidden')) { x.removeAttribute('hidden');}
y = x.querySelector('div#like-bar')
y.style.width = '50%'

This restores ratio bar. It's the same technique as used in #495

y = x.querySelector('tp-yt-paper-tooltip div#tooltip')
if (y.classList.contains('hidden')) {y.classList.remove('hidden');}
y.innerHTML = '123/456'

This reveals the tooltip, but it's not hover but always on. I don't know how to make it dynamic? In the old UI the hidden class is replaced with fade-in-animation on mouse hover (and vice versa)

cyrildtm avatar Apr 21 '22 12:04 cyrildtm

These are workarounds however, i think the project should support ratio bars if this UI change is on a significant amount of users, which it is.

Hacks and workarounds aren't a solution.

databoose avatar May 11 '22 16:05 databoose

@databoose #495 is the solution.

cyrildtm avatar May 11 '22 16:05 cyrildtm