YT Theatermode

Auto and full screeded Theater mode.

Από την 18/10/2021. Δείτε την τελευταία έκδοση.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name        YT Theatermode
// @namespace   YT Theatermode
// @author      ndaesik
// @include     https://www.youtube.com/*
// @run-at      document-start
// @icon        https://lh3.googleusercontent.com/iLZyxGK7l1343U4E7eAfgKbRWW6qhzCJq-Z92M60JzCMntFyaFF2GUQVRxPhfGcy6qRISLjHv4fX1vtq0TZkZMAzBjM=w128-h128-e365-rj-sc0x00ffffff
// @description Auto and full screeded Theater mode.
// @version     1.0
// ==/UserScript==


window.addEventListener("yt-navigate-finish", function(event) {
  var timer = setTimeout(function() {
      if ((document.querySelector('ytd-player').offsetWidth + 100) < window.innerWidth) {
          document.querySelector('.ytp-size-button').click();
          console.log("hello");
    }
  }, 500)
})

var styles = `
[dark] .gstl_50.sbdd_a *{background-color:#232323!important;border-color:#282828!important}
[dark] .gsfs,[dark] .sbpqs_a{color:#FFF!important}

ytd-app:not([guide-persistent-and-visible]) ytd-page-manager {
  margin-top: 0!important;
}

ytd-app:not([guide-persistent-and-visible]) #player-theater-container:empty~#columns #primary,
ytd-app:not([guide-persistent-and-visible]) #player-theater-container:empty~#columns #secondary{
    padding-top: 56px;
}

ytd-app:not([guide-persistent-and-visible]) ytd-masthead,
ytd-app:not([guide-persistent-and-visible]) #masthead-container.ytd-app::after {
  transform: translateY(-56px);
  transition: transform .1s .5s ease-out;
}
ytd-app:not([guide-persistent-and-visible]) #masthead-container:hover ytd-masthead,
ytd-app:not([guide-persistent-and-visible]) #masthead-container:hover.ytd-app::after {
  transform: translateY(0px);
}

ytd-app:not([guide-persistent-and-visible]) [theater] #player.ytd-watch {
  height: 100vh!important;
  max-height: 100vh!important;
}

ytd-watch-flexy[theater] #player-theater-container.ytd-watch-flexy,
ytd-watch-flexy[fullscreen] #player-theater-container.ytd-watch-flexy,
ytd-app:not([guide-persistent-and-visible]) [theater] #player video {
  width: 100%!important;
  height: 100vh!important;
  max-height: 100vh!important;
  max-width: 100%!important;
  left: 0!important;
}

ytd-app:not([guide-persistent-and-visible]) .ytp-chrome-top.ytp-share-button-visible,
ytd-app:not([guide-persistent-and-visible]) #iv-drawer .iv-drawer-header,
ytd-app:not([guide-persistent-and-visible]) #iv-drawer .iv-drawer-content {
  margin-top: 30px;
}

ytd-app:not([guide-persistent-and-visible]) [theater] .ytp-chrome-top.ytp-share-button-visible,
ytd-app:not([guide-persistent-and-visible]) [theater] #iv-drawer .iv-drawer-header,
ytd-app:not([guide-persistent-and-visible]) [theater] #iv-drawer .iv-drawer-content,
ytd-app:not([guide-persistent-and-visible]) [theater] .ytp-multicam-menu-header,
ytd-app:not([guide-persistent-and-visible]) [theater] .ytp-multicam-menu-items,
ytd-app:not([guide-persistent-and-visible]) [theater] .ytp-playlist-menu-header,
ytd-app:not([guide-persistent-and-visible]) [theater] .ytp-playlist-menu-items,
ytd-app:not([guide-persistent-and-visible]) [theater] .ytp-share-panel-close {
  margin-top: 56px;
}

ytd-app:not([guide-persistent-and-visible]) .ytp-tooltip.ytp-tooltip-opaque.ytp-bottom {
  right: 60px!important;
  top: 35px!important;
}

ytd-app:not([guide-persistent-and-visible]) [theater] .ytp-tooltip.ytp-tooltip-opaque.ytp-bottom {
  right: 60px!important;
  top: 60px!important;
}
`

var styleSheet = document.createElement("style")
styleSheet.type = "text/css"
styleSheet.innerText = styles
document.head.appendChild(styleSheet)