优酷影院模式

自动转到更宽的 YouTube 屏幕

目前为 2022-01-21 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name:ko 유튜브 극장모드
  3. // @name Youtube Theatermode
  4. // @name:ru Youtube Театральный режим
  5. // @name:jp Youtubeシアターモード
  6. // @name:zh-CN 优酷影院模式
  7. // @name:zh-TW 優酷影院模式
  8.  
  9. // @description:ko 유튜브 화면을 자동으로 꽉 찬 화면으로 바꿉니다.
  10. // @description Turn to wider Youtube screen automatially.
  11. // @description:ru Автоматически переключайтесь на более широкий экран Youtube.
  12. // @description:jp 自動的に広いYouTube画面に移動します
  13. // @description:zh-CN 自动转到更宽的 YouTube 屏幕
  14. // @description:zh-TW 自動轉到更寬的 YouTube 屏幕
  15.  
  16. // @namespace https://ndaesik.tistory.com/
  17. // @version 2022.01.21.22:10
  18. // @author ndaesik
  19. // @icon https://lh3.googleusercontent.com/iLZyxGK7l1343U4E7eAfgKbRWW6qhzCJq-Z92M60JzCMntFyaFF2GUQVRxPhfGcy6qRISLjHv4fX1vtq0TZkZMAzBjM
  20. // @match https://www.youtube.com/*
  21. // ==/UserScript==
  22.  
  23. window.addEventListener("yt-navigate-finish", function(e) {
  24. setTimeout(() => {if ((document.querySelector('ytd-player').offsetWidth + 100) < window.innerWidth) document.querySelector('.ytp-size-button').click()}, 1500)
  25. })
  26. var styles = `
  27. [dark] .gstl_50.sbdd_a * {background-color:#232323!important; border-color:#282828!important}
  28. [dark] .gsfs,[dark] .sbpqs_a{color:#FFF!important}
  29.  
  30. ytd-app:not([guide-persistent-and-visible]) ytd-page-manager {margin-top: 0!important;}
  31. ytd-app:not([guide-persistent-and-visible]) :is(
  32. #player-theater-container:empty~#columns #primary,
  33. #player-theater-container:empty~#columns #secondary
  34. ) {padding-top: 56px;}
  35.  
  36. ytd-app:not([guide-persistent-and-visible]) :is(
  37. ytd-masthead,
  38. #masthead-container.ytd-app::after
  39. ) {transform: translateY(-56px); transition: transform .1s .5s ease-out;}
  40.  
  41. ytd-app:not([guide-persistent-and-visible]) :is(
  42. #masthead-container:hover ytd-masthead,
  43. #masthead-container:hover.ytd-app::after
  44. ) {transform: translateY(0px);}
  45.  
  46. ytd-app:not([guide-persistent-and-visible]) [theater] #player.ytd-watch {height: 100vh!important; max-height: 100vh!important;}
  47.  
  48. :is(ytd-watch-flexy[theater],ytd-watch-flexy[fullscreen]) #player-theater-container.ytd-watch-flexy,
  49. ytd-app:not([guide-persistent-and-visible]) [theater] #player video {
  50. width: 100%!important; height: 100vh!important; max-height: 100vh!important; max-width: 100%!important; left: 0!important;
  51. }
  52.  
  53. ytd-app:not([guide-persistent-and-visible]) :is(
  54. .ytp-chrome-top.ytp-share-button-visible, #iv-drawer .iv-drawer-header, #iv-drawer .iv-drawer-content
  55. ) {margin-top: 30px;}
  56.  
  57. ytd-app:not([guide-persistent-and-visible]) [theater] :is(
  58. #iv-drawer .iv-drawer-header, #iv-drawer .iv-drawer-content,
  59. .ytp-chrome-top.ytp-share-button-visible, .ytp-multicam-menu-header, .ytp-multicam-menu-items,
  60. .ytp-playlist-menu-header, .ytp-playlist-menu-items, .ytp-share-panel-close
  61. ) {margin-top: 56px;}
  62.  
  63. ytd-app:not([guide-persistent-and-visible]) .ytp-tooltip.ytp-tooltip-opaque.ytp-bottom {
  64. right: 60px!important; top: 35px!important;}
  65.  
  66. ytd-app:not([guide-persistent-and-visible]) [theater] .ytp-tooltip.ytp-tooltip-opaque.ytp-bottom {
  67. right: 60px!important; top: 60px!important;}`
  68. var styleSheet = document.createElement("style")
  69. styleSheet.type = "text/css"
  70. styleSheet.innerText = styles
  71. document.head.appendChild(styleSheet)

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址