Problems with youtube+ floating player

About: Youtube UI Fix
已編輯 June 2016 腳本討論 Firefox
-So 'Youtube+' script has this feature called floater player (basically the video player stays visible when scrolling).
Now, that one can be moved around.
But the problem is, along with your 'UI fix' script enabled it doesn't let me move the player around freely. It instead just deselects it and "drops" it, and when mouse is released the video is paused..

-And another thing is, the floater player there is all messed up. It's height is from top to bottom of the page, and not in ratio with the selected width from the youtube+ script.

If you can take care of this would be great. I'm already using a css style in stylish to take care of the height issue. But if the floating player is moved by mistake, it can be very difficult to position it back.

I'm probably gonna ask the youtube+ dev to fix this, but I think I know what his answer is going to be.


  • I've fixed the weird height thing, but the dragging is going to require a change in the youtube+ script. Not much though...

    There are only two changes needed: one is to add a css class when dragging the floater around, and the second is to add 35 pixels to the height of the floater. I've tried to do this myself, and it worked:!RZxghKaI!NNDXmBOUrMRVs3988NBJEVk4SaVmszybLMrXFPJREts

    But I'm not going to do this every time youtube+ updates their script, so you'll need to convince the youtube+ dev to put these changes in (the class for sure, and the 35 pixels only if my script is present). Or you could do this yourself...

    The first change is around line 867:

    if (event.type === "mousedown" && player.contains( && (!excluded || !excluded.contains( {
        player.classList.add("dragging-mode"); //<= add this line

    And around line 887

    if (event.buttons !== 1 || event.type === "click") {
        player.classList.remove("dragging-mode"); //<= add this line
        if (window.hasMoved) {

    The second change is around line 854

    height = (height < 350 ? 350 : height) / (16 / 9);
    player.setAttribute("style", "width:" + (height * (16 / 9)) + "px;height:" + (height + 35) + "px;left:" + bounds.X + "px;top:" + bounds.Y + "px");
    // change the line above, height into (height + 35) 
    // and don't forget the parentheses!

    This may seem like a lot of work. I know, I have to do this for the Resize YT To Window Size script.

  • OK, I will forward this to the youtube+ dev
Sign In or Register to comment.