Youtube Ratings Bar

By flux242 Last update May 18, 2013 — Installed 17,098 times.

Small tweak & a feature request

in
Subscribe to Small tweak & a feature request 2 posts, 1 voice



Alek T Scriptwright
FirefoxWindows

I added the following at line 147 to fix the position of the watch later button

// fixing watch later button position to be inside of the thumb image
var buttons = videoThumb.parentNode.parentNode.getElementsByTagName("button");
for (var i=0; i<buttons.length; ++i )
  if (buttons[i].getAttribute("class")=="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short")
  {
    buttons[i].style.bottom = "7px";
    break;
  }
  else if (buttons[i].getAttribute("class")=="addto-button video-actions addto-watch-later-button addto-watch-later-button-expandable yt-uix-button yt-uix-button-default yt-uix-button-short")
  {
    buttons[i].style.bottom = "7px";
    buttons[i].setAttribute("onmouseover", "this.style.bottom='5px'");
    buttons[i].setAttribute("onmouseout", "this.style.bottom='7px'");
    break;
  }

Could you modify the tooltip so that it appears when you hover anywhere on the thumbnail, instead of just on the bar? The bar is kind of small, so it's hard to check it easily. This script has a picture of what I mean.

EDIT: Add at line 144 in version 1.0.4.

 
Alek T Scriptwright
FirefoxWindows

Now at line 130 in version 1.0.5:

    // fixing watch later button position to be inside of the thumb image
    var buttons = videoThumb.parentNode.parentNode.getElementsByTagName("button");
    for (var i=0; i<buttons.length; ++i )
      if (buttons[i].getAttribute("title")=="Watch Later")
      {
        buttons[i].style.bottom = "7px";
        break;
      }