Always show the control bar below the video

Show all the time the control bar below the video with a cheap trick

Stan na 05-09-2023. Zobacz najnowsza wersja.

// ==UserScript==
// @name          Always show the control bar below the video
// @version       1.2
// @description   Show all the time the control bar below the video with a cheap trick
// @author        AlExito
// @match         https://www.youtube.com/*
// @license       MIT   feel free to modify improve and share
// @noframes
// @namespace https://greasyfork.org/es/users/758165-AlÉxito
// ==/UserScript==
let css = `
.ytp-live .ytp-time-current, .ytp-live .ytp-time-separator{display: inline-table !important;} 
ytd-watch-flexy[full-bleed-player] #full-bleed-container.ytd-watch-flexy { height: 59.3vw; }
ytd-watch-flexy[flexy]:not([is-vertical-video_]) #player-container-inner.ytd-watch-flexy { height: 30px; }
ytd-watch-flexy[full-bleed-player] #full-bleed-container.ytd-watch-flexy { padding-bottom: 40px;}
ytd-player, #container.ytd-player { height: 100%; }
div#[full-bleed-player] ytd-player, #container.ytd-player { height: 103%; }
div#[full-bleed-player] .ytp-chrome-bottom { bottom: -5px !important; }
.ytp-chrome-bottom { bottom: -15px !important; }
.ytp-progress-bar-container { bottom: 40px !important;}  

.ytp-popup.ytp-settings-menu { opacity: 0; }
.ytp-popup.ytp-settings-menu:hover { opacity: 1; }
`;
let style = document.createElement('style');
style.textContent = css;
document.head.appendChild(style);
   var vid = document.querySelector('video');
     vid.addEventListener('timeupdate', function(){
        var butElement = document.getElementsByClassName("ytp-settings-button")[0];
        var progres = document.querySelector(".ytp-progress-bar-container:hover");
        if (!progres) {
        var menElement = document.getElementsByClassName("ytp-settings-menu")[0];
        if (menElement.style.display == "none"){
        butElement.dispatchEvent(new Event("click"));
        }
      }
 });

vid.addEventListener('click', e => {
  if (event.button === 0 ) {
    vid.pause();
  }
})