YouTube Live Borderless

Make YouTube Live Borderless

目前为 2023-05-24 提交的版本。查看 最新版本

  1. /* ==UserStyle==
  2. @name YouTube Live Borderless
  3. @version 0.4.40
  4. @namespace github.com/cyfung1031
  5. @license MIT
  6. @description Make YouTube Live Borderless
  7. @author CY Fung
  8. @supportURL https://github.com/cyfung1031/YouTube-Live-Borderless/
  9. @compatible edge Edge [Blink] >= 105; Stylus (Beta)
  10. @compatible chrome Chrome >= 105; Stylus (Beta); Chrome 101-104 requires "enable-experimental-web-platform-features"
  11. @compatible firefox FireFox >= 103; Stylus; layout.css.has-selector.enabled = true; note: some features might not be very stable!!
  12. @compatible opera Opera >= 91; Stylus (Beta)
  13. @compatible safari Safari >= 15.4; Stylus
  14. @preprocessor stylus
  15. @var select mode-for-two-col "Mode ##TwoColumns" {
  16. "Expanded Panel Only #Recommended": "expanded-panel",
  17. "Expanded Live Chat Only": "expanded-live",
  18. "Expandable Live Chat Only": "expandable-live",
  19. "Always": "always"
  20. }
  21. @var select mode-for-single-col "Mode ##SingleColumn" {
  22. "YT Mobile #Recommended": "mobile",
  23. "Normal": "normal",
  24. "Disabled": "disabled"
  25. }
  26. @var checkbox no-masthead "Top.MastheadBar ::Hide" 0
  27. @var number masthead-hoverable-h "Top.MastheadBar ::Hoverable >>>1_alwaysHide" [4, 1, 8, 1]
  28. @var checkbox disable-cinematics "CinematicsEffect ::Disable" 0
  29. @var range video-enlarging "Video.Enlarging >>>Video.Border.Fine.Tune" [0, 0, 8, 2]
  30. @var range video-padding-left-right "Video.Padding.LeftRight (Experimental)" [0, 0, 18, 2, 'px']
  31. @var range video-padding-top-bottom "Video.Padding.TopBottom (Experimental)" [0, 0, 18, 2, 'px']
  32. @var range primary-content-margin "PrimaryContent ::Margin" [24, 6, 48, 6, "px"]
  33. @var range video-title-size "VideoTitle ::Size" [2.0, 1.0, 3.0, 0.2, "rem"]
  34. @var checkbox no-bottom-row "Bottom.PrimaryMetaInfoRow ::Hide" 0
  35. @var range min-below-area "BelowArea ::Minimum >>>10px_disable" [120, 10, 240, 10, 'px']
  36. @var range min-below-area-for-theater "WideTheater.BelowArea ::Minimum >>>10px_disable" [120, 10, 240, 10, 'px']
  37. @var number side-panel-width "SidePanel ::Width" [440, 320, 640, 20, "px"]
  38. @var checkbox no-round-border "RoundBorder ::Disable" 1
  39. @var number chat-zoom-for-right-col "RightCol.Chat ::Zoom" [1.0, 0.4, 1.2, 0.05]
  40. @var range chat-btn-height "RightCol.Chat ::SpaceAbove@Zoom >>>4px_disable" [36, 4, 60, 4, 'px']
  41. @var number chat-zoom-for-mobile "YTMobile.Chat ::Zoom" [1.0, 0.4, 1.2, 0.05]
  42. @var range chat-min-height "YTMobile.Chat ::Min.Height" [400, 20, 900, 10, 'px']
  43. @var checkbox t34 "Disable Some CSS Rules for laggy page" 0
  44. ==/UserStyle== */
  45. /*
  46.  
  47. @var range chrome-bottom-bar-margin "Chrome Bottom Bar Margin" [12, 6, 48, 6, "px"]
  48.  
  49. Chrome Bottom Bar Margin is 12px only due to
  50.  
  51. MU = function(a) {
  52. var b = a.u.ag()
  53. , c = a.G.getVideoData().D
  54. , d = 0;
  55. a.u.ag() && a.u.Me() && (d = (a.G.fb().getPlayerSize().width - a.G.getVideoContentRect().width) / 2);
  56. return 12 * (c ? 0 : b ? 2 : 1) + d
  57. }
  58.  
  59. */
  60. // d
  61. t33 = t34
  62. @-moz-document url-prefix("https://www.youtube.com/watch?v=") {
  63.  
  64. dummy() {
  65. // dummy
  66. border: 0;
  67. }
  68. buildL4(type, args...) {
  69. st1 = join('', ':', type, '(', join('\, ', args), ')')
  70. selector(st1)
  71. }
  72.  
  73. if min-below-area <= 10px {
  74. min-below-area = 0px
  75. }
  76. if min-below-area-for-theater <= 10px {
  77. min-below-area-for-theater = 0px
  78. }
  79. chat-btn-height = chat-btn-height + 1px
  80. if chat-btn-height == 4px + 1px {
  81. chat-btn-height = 0px
  82. }
  83. masthead-hoverable-height = (masthead-hoverable-h - 1) * 2px
  84.  
  85. no-masthead-w = no-masthead //
  86. chrome-bottom-bar-margin = 12px // this cannot be changed
  87.  
  88. single-col-mobile = (mode-for-single-col == "mobile" ? 1 : 0) //
  89. if single-col-mobile == 1 and no-masthead-w == 0 {
  90. no-masthead-w = 2 //
  91. }
  92. chat-zoom-for-mobile-enable = ((chat-zoom-for-mobile < 1) or (chat-zoom-for-mobile > 1))
  93.  
  94. content361(){
  95. html {
  96. --ylb-min-below-area: min-below-area;
  97. }
  98. // general fix
  99. ytd-watch-flexy[theater] #player-theater-container.ytd-watch-flexy {
  100. min-height: unset;
  101. }
  102. #movie_player .ytp-cued-thumbnail-overlay-image {
  103. /* background-size: contain !important; */
  104. background-size: auto 100% !important;
  105. }
  106. ytd-watch-flexy:not([is-two-columns_]) ytd-watch-metadata {
  107. padding-top: var(--ytd-margin-3x);
  108. }
  109. ytd-watch-flexy:not([is-two-columns_]):not([fullscreen]) #primary.ytd-watch-flexy {
  110. padding-top: 0;
  111. margin-top: 0;
  112. }
  113. html:not([tabview-loaded]):has(ytd-live-chat-frame#chat:not([collapsed])):has(iframe#chatframe) {buildL4('is',
  114. '#primary-inner.ytd-watch-flexy ytd-comments#comments.ytd-watch-flexy',
  115. '#secondary-inner.ytd-watch-flexy > #related.ytd-watch-flexy')} {
  116. display: none !important;
  117. }
  118. html:not([tabview-loaded]) #cinematics {
  119. // contain: layout;
  120. contain: layout size style;
  121. user-select: none;
  122. touch-action: none;
  123. pointer-events: none;
  124. }
  125.  
  126.  
  127. }
  128.  
  129. //
  130. contentNoMasthead() {
  131.  
  132. // root = html
  133. & {
  134. /* 0px not 0 */
  135. --ytd-masthead-height: 0px;
  136. --ytd-toolbar-height: 0px;
  137. --ytd-watch-flexy-masthead-height: 0px;
  138. }
  139. /*
  140. & ytd-watch-flexy {
  141. --ytd-watch-flexy-masthead-height: 0px;
  142. }
  143. */
  144. /*
  145. #masthead-container + ytd-page-manager#page-manager
  146. has margin-top var(--ytd-masthead-height,var(--ytd-toolbar-height))
  147. */
  148. ytd-app[style] { /* YouTube set the masthead-height in style */
  149. --ytd-masthead-height: 0px !important;
  150. --ytd-toolbar-height: 0px !important;
  151. --ytd-watch-flexy-masthead-height: 0px !important;
  152. }
  153. & .style-scope{buildL4('is', '#page-manager', 'ytd-watch-flexy', 'ytd-page-manager')} {
  154. --ytd-masthead-height: 0px;
  155. --ytd-toolbar-height: 0px;
  156. --ytd-watch-flexy-masthead-height: 0px;
  157. }
  158.  
  159. #masthead-container {
  160. height: 0;
  161. --masthead-opacity: 0;
  162. opacity: var(--masthead-opacity) !important;
  163. transition: opacity 300ms;
  164. min-height: masthead-hoverable-height;
  165. contain: layout size style;
  166. }
  167.  
  168. #masthead-container > ytd-masthead {
  169. transform: translateY(-100%);
  170. transition: transform 300ms;
  171. }
  172.  
  173.  
  174. if masthead-hoverable-height > 0 {
  175.  
  176. ytd-app {
  177. --ut-masthead-background: rgba(15,15,15,0.8);
  178. }
  179. ytd-app[darker-dark-theme] {
  180. --ut-masthead-background: rgba(240,240,240,0.8);
  181. }
  182. ytd-masthead#masthead:hover {
  183. background-color: color(--ut-masthead-background);
  184. z-index: 9999 !important;
  185. }
  186.  
  187. ytd-masthead#masthead {
  188. background-color: rgba(15,15,15,0.8);
  189. z-index: 9999 !important;
  190. }
  191.  
  192. #masthead-container:hover {
  193. --masthead-opacity: 1;
  194. }
  195.  
  196. #masthead-container:hover > ytd-masthead {
  197. transform: translateY(0%);
  198. }
  199.  
  200. #masthead-container::after {
  201. content: '';
  202. display: flex;
  203. width: 100%;
  204. height: masthead-hoverable-height;
  205. top: 0;
  206. z-index: 77;
  207. cursor: default;
  208. user-select: none !important;
  209. touch-action: none !important;
  210. box-sizing: border-box;
  211. padding: 0;
  212. margin: 0;
  213. }
  214. }
  215. if t33 == 0 {
  216.  
  217. ytd-watch-flexy.style-scope[is-two-columns_]:not([fullscreen]):not([theater]) {
  218.  
  219. #columns.style-scope.ytd-watch-flexy,
  220. #primary.style-scope.ytd-watch-flexy,
  221. #primary-inner.style-scope.ytd-watch-flexy,
  222. #secondary.style-scope.ytd-watch-flexy,
  223. #secondary-inner.style-scope.ytd-watch-flexy {
  224. height: 100vh;
  225. max-height: 100%;
  226. }
  227. }
  228.  
  229. ytd-watch-flexy.style-scope[is-two-columns_][theater]:not([fullscreen]) {
  230.  
  231. height: 100vh;
  232. #player-theater-container.ytd-watch-flexy {
  233. flex: 77;
  234. max-height: unset;
  235. }
  236.  
  237.  
  238. }
  239.  
  240.  
  241.  
  242. &:not([tabview-loaded]) ytd-watch-flexy.style-scope[is-two-columns_][theater]:not([fullscreen]) {
  243.  
  244.  
  245. #player-theater-container.ytd-watch-flexy ~ #columns.style-scope.ytd-watch-flexy {
  246. overflow: visible;
  247. }
  248. }
  249.  
  250. }
  251.  
  252. } //
  253. #microformat.ytd-watch-flexy {
  254. position: fixed;
  255. top:-200vh;
  256. left:-200vw;
  257. }
  258. contentSingleColMobile(){
  259.  
  260. // html:has(ytd-watch-flexy:not([is-two-columns_]):not([fullscreen]))
  261.  
  262. #chat:not([collapsed]) {
  263. --ytd-margin-2x: 0;
  264. --ytd-margin-4x: 0;
  265. --ytd-margin-6x: 0;
  266. --ytd-margin-8x: 0;
  267.  
  268. height: 100% !important;
  269. min-height: unset !important;
  270. max-height: 100vh !important;
  271.  
  272. // position:relative;
  273. // top:auto;
  274. // bottom:0;
  275.  
  276. iframe#chatframe{
  277.  
  278.  
  279. min-height: 0px;
  280.  
  281. }
  282.  
  283.  
  284.  
  285. if chat-zoom-for-mobile-enable {
  286.  
  287.  
  288. iframe-transform = 'scale(%s)' % chat-zoom-for-mobile
  289. iframe-ratio = 100% / chat-zoom-for-mobile
  290.  
  291. iframe#chatframe {
  292. position:absolute;
  293.  
  294. transform: iframe-transform;
  295. height: s('calc((100% - %s) / %s) !important', chat-btn-height, chat-zoom-for-mobile);
  296. max-height: unset !important;
  297. min-height: unset !important;
  298. transform-origin: 0 0;
  299. width: iframe-ratio !important;
  300. margin-top: chat-btn-height;
  301.  
  302.  
  303. }
  304.  
  305.  
  306. }
  307.  
  308.  
  309. }
  310.  
  311.  
  312.  
  313. &:has(#chat:not([collapsed])) {
  314. // html:has(ytd-watch-flexy:not([is-two-columns_]):not([fullscreen])):has(#chat:not([collapsed]))
  315.  
  316. #contentContainer.tp-yt-app-drawer[swipe-open].tp-yt-app-drawer::after {
  317.  
  318. content: unset;
  319.  
  320. }
  321.  
  322.  
  323. if t33 == 0 {
  324.  
  325. #primary-inner.ytd-watch-flexy ytd-comments#comments.ytd-watch-flexy,
  326. #below.ytd-watch-flexy > .ytd-watch-flexy{buildL4('is', '#related', 'ytd-watch-metadata')} {
  327. /* display:none !important; */
  328. position: fixed !important;
  329. transform: scale(0.01) !important;
  330. transform-origin: 0 0 !important;
  331. left: -100vw !important;
  332. top: -100vh !important;
  333. visibility: collaspe !important;
  334. pointer-events: none !important;
  335. user-select: none !important;
  336. touch-action: none !important;
  337. }
  338.  
  339. }
  340.  
  341. #secondary.ytd-watch-flexy {
  342. display:none !important;
  343. }
  344.  
  345.  
  346.  
  347.  
  348. .efyt-control-bar {
  349. position: relative;
  350. display: inline-flex;
  351. top: auto;
  352. left: auto;
  353. z-index: 99999;
  354. opacity: 0.8;
  355. transform: translate(calc(-100% + 32px), 0) !important;
  356. }
  357.  
  358. .efyt-control-bar:hover {
  359. opacity: 1.0;
  360. background: var(--yt-spec-general-background-a);
  361. transform: translate(0px, 0) !important;
  362. }
  363.  
  364. #player {
  365. margin-bottom: 0;
  366. }
  367.  
  368.  
  369.  
  370. {buildL4('is', '#columns', '#primary')} {
  371. padding: 0;
  372. }
  373.  
  374. --ylb-min-below-area: chat-min-height;
  375.  
  376.  
  377.  
  378.  
  379. {buildL4('is', '#player', '#player-theater-container', '#player-container-outer', '#player-container-inner', '#player-container', '#movie_player', '#movie_player video')} {
  380. object-fit: contain;
  381. max-height: calc(100vh - var(--ytd-toolbar-height) - var(--ylb-min-below-area, 0px)) !important;
  382.  
  383. }
  384.  
  385.  
  386. if t33 == 0 {
  387.  
  388. #primary-inner.ytd-watch-flexy > :not(.style-scope) {
  389. display: none !important;
  390. }
  391.  
  392. #below > *:not(#chat) {
  393. /* display:none !important; */
  394. position: fixed !important;
  395. transform: scale(0.01) !important;
  396. transform-origin: 0 0 !important;
  397. left: -100vw !important;
  398. top: -100vh !important;
  399. visibility: collaspe !important;
  400. pointer-events: none !important;
  401. user-select: none !important;
  402. touch-action: none !important;
  403.  
  404. }
  405. }
  406.  
  407. #below:not(:has(#chat)) {
  408. display: none;
  409. }
  410.  
  411.  
  412.  
  413. {buildL4('is', 'ytd-watch-flexy', '#columns.ytd-watch-flexy', '#primary.ytd-watch-flexy', '#primary-inner.ytd-watch-flexy')} {
  414. display: flex;
  415. flex-direction: column;
  416. margin: 0;
  417. flex: 1;
  418. }
  419.  
  420. #below {
  421. flex: 1;
  422. }
  423.  
  424. ytd-watch-flexy {
  425. height: 100vh !important;
  426. max-height: 100vh !important;
  427. }
  428.  
  429. ytd-watch-flexy{buildL4('is', '[theater]', '[fullscreen]')} #player-theater-container.ytd-watch-flexy {
  430.  
  431. min-height: unset !important;
  432. }
  433. }
  434.  
  435.  
  436. }
  437.  
  438. content2c() {
  439.  
  440. if t33 == 0 {
  441. if chat-zoom-for-right-col >1 or chat-zoom-for-right-col < 1 {
  442.  
  443. ytd-watch-flexy[is-two-columns_]:not([fullscreen]) iframe#chatframe {
  444.  
  445. position:absolute;
  446. margin-top:chat-btn-height;
  447.  
  448. transform: 'scale(%s)' % chat-zoom-for-right-col;
  449. transform-origin: 0 0;
  450. width: '%s !important' % (100% / chat-zoom-for-right-col);
  451. max-width: unset !important;
  452. height: s('calc( (100% - %s) / %s ) !important', chat-btn-height, chat-zoom-for-right-col);
  453. z-index: 1; /* for normal youtube */
  454.  
  455. }
  456.  
  457. }
  458.  
  459.  
  460. if no-masthead-w==0 {
  461.  
  462. ytd-watch-flexy.style-scope[is-two-columns_]:not([theater]):not([fullscreen]) {
  463.  
  464. .style-scope.ytd-watch-flexy{buildL4('is', '#secondary', '#secondary-inner')} {
  465. height: calc(100vh - var(--ytd-toolbar-height));
  466. max-height: 100%;
  467. }
  468. }
  469. }
  470.  
  471.  
  472. ytd-watch-flexy[is-two-columns_]:not([fullscreen]) #movie_player {
  473.  
  474. .ytp-chrome-bottom[style*="width"] {
  475. width: unset !important;
  476. left: chrome-bottom-bar-margin !important;
  477. right: chrome-bottom-bar-margin !important;
  478. }
  479.  
  480. }
  481.  
  482.  
  483. /*
  484.  
  485. // originally this is to avoid sizing issue; however, as userscript "YouTube Video Resize Fix" is a must, this is no longer required.
  486. // this css rule not compatible with YouTubeLiveClock
  487.  
  488. ytd-watch-flexy:not([is-two-columns_]):not([fullscreen]) #movie_player {
  489.  
  490. .ytp-chrome-bottom[style*="width"] {
  491. left: 50% !important;
  492. transform: translateX(-50%);
  493. }
  494.  
  495. }
  496.  
  497. */
  498.  
  499.  
  500. ytd-watch-flexy.style-scope[is-two-columns_]:not([theater]):not([fullscreen]) ytd-live-chat-frame#chat:not([collapsed]) {
  501. min-height: unset;
  502. }
  503.  
  504.  
  505.  
  506. ytd-watch-flexy.style-scope[is-two-columns_]:not([fullscreen]) #primary-inner.ytd-watch-flexy > *:not(#player) {
  507. padding: 0 primary-content-margin 0;
  508. }
  509.  
  510.  
  511. ytd-watch-flexy.style-scope[is-two-columns_]:not([theater]):not([fullscreen]) #player .ytd-watch-flexy{buildL4('is', '#player-container-outer', '#player-container-inner', '#player-container')}{
  512.  
  513. // layout outside
  514. // no effect
  515. // layout inside
  516. max-height: calc(100vh - var(--ytd-toolbar-height, 0px) - var(--ylb-min-below-area, 0px)); // for very wide screen
  517. }
  518.  
  519. ytd-watch-flexy.style-scope[is-two-columns_][theater]:not([fullscreen]) #player-theater-container.ytd-watch-flexy {
  520. max-height: calc(100vh - var(--ytd-toolbar-height, 0px) - var(--ylb-min-below-area, 0px)); // for 4:3 video
  521.  
  522. }
  523.  
  524.  
  525.  
  526. body.lock-scrollbar[style*="overflow"][style*="hidden"]:has(ytd-watch-flexy[is-two-columns_]:not([hidden])):has(#movie_player) {
  527. overflow-y: unset !important;
  528. }
  529.  
  530.  
  531. ytd-watch-flexy.style-scope[is-two-columns_] #columns.ytd-watch-flexy > #secondary.ytd-watch-flexy {
  532. width: side-panel-width;
  533. }
  534.  
  535. }
  536.  
  537.  
  538. }
  539.  
  540. contentf() {
  541. // html
  542. if t33 == 0 {
  543.  
  544. if (video-padding-left-right + video-padding-top-bottom) > 0 {
  545.  
  546. #player-container-outer.ytd-watch-flexy {
  547. padding-left: video-padding-left-right;
  548. padding-right: video-padding-left-right;
  549. padding-top: video-padding-top-bottom;
  550. padding-bottom: video-padding-top-bottom;
  551. }
  552.  
  553. }
  554.  
  555.  
  556. body ytd-watch-flexy[flexy] #player-container-outer.ytd-watch-flexy {
  557. max-width: unset; // override var(--ytd-watch-flexy-max-player-width);
  558. }
  559.  
  560. &:not([tabview-loaded]) {
  561.  
  562. body ytd-watch-flexy[flexy][is-two-columns_]{buildL4('is', '[is-extra-wide-video_]', '[is-four-three-to-sixteen-nine-video_]')} #primary.ytd-watch-flexy {
  563.  
  564. max-width: unset; // override var(--ytd-watch-flexy-max-player-width);
  565.  
  566. }
  567.  
  568.  
  569. ytd-watch-flexy:not([fullscreen]) #player-theater-container {
  570. max-height: calc(100vh - var(--ytd-toolbar-height) - var(--ylb-min-below-area, 0px)) !important;
  571. }
  572.  
  573.  
  574. ytd-watch-flexy[is-two-columns_]:not([theater]):not([fullscreen]) {buildL4('is', '#columns', '#primary', '#primary-inner', '#secondary', '#secondary-inner')} {
  575. height: calc(100vh - var(--ytd-toolbar-height));
  576. }
  577.  
  578. }
  579.  
  580. if video-enlarging > 0 {
  581.  
  582. ytd-watch-flexy:not([theater]):not([fullscreen]) #movie_player video[src] {
  583. transform: 'scale(%s)' % (video-enlarging / 1000 + 1) ;
  584. transform-origin: 50% 50%;
  585. }
  586.  
  587. }
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595. ytd-watch-flexy[flexy][is-two-columns_][theater]:not([fullscreen]) {
  596.  
  597. --ylb-min-below-area: min-below-area-for-theater;
  598.  
  599.  
  600. {buildL4('is', '#player', '#player-theater-container', '#player-container-outer', '#player-container-inner', '#player-container', '#movie_player', '#movie_player video')} {
  601. object-fit: contain;
  602. max-height: calc(100vh - var(--ytd-toolbar-height) - var(--ylb-min-below-area, 0px)) !important;
  603. }
  604. }
  605.  
  606.  
  607.  
  608. if no-bottom-row {
  609.  
  610. #bottom-row.ytd-watch-metadata {
  611. display: none !important;
  612. }
  613. }
  614.  
  615. h1.ytd-watch-metadata {
  616. font-size: video-title-size;
  617. --font-size: video-title-size;
  618. line-height: 140%;
  619. margin-bottom: -2px;
  620. }
  621.  
  622.  
  623. ytd-watch-flexy.style-scope:not([fullscreen]) {
  624.  
  625. & {
  626. --ytd-margin-2y: var(--ytd-margin-2x);
  627. --ytd-margin-4y: var(--ytd-margin-4x);
  628. --ytd-margin-6y: var(--ytd-margin-6x);
  629. --ytd-margin-8y: var(--ytd-margin-8x);
  630. }
  631.  
  632. #columns.style-scope.ytd-watch-flexy {
  633. --ytd-margin-2x: 0;
  634. --ytd-margin-4x: 0;
  635. --ytd-margin-6x: 0;
  636. --ytd-margin-8x: 0;
  637. }
  638.  
  639. .style-scope.ytd-watch-flexy > :not(.ytd-watch-flexy),
  640. #below,
  641. #player {
  642. --ytd-margin-2x: var(--ytd-margin-2y);
  643. --ytd-margin-4x: var(--ytd-margin-4y);
  644. --ytd-margin-6x: var(--ytd-margin-6y);
  645. --ytd-margin-8x: var(--ytd-margin-8y);
  646. }
  647.  
  648. #secondary-inner.style-scope.ytd-watch-flexy {
  649. display: flex;
  650. flex-direction: column;
  651. height: 100%;
  652. }
  653.  
  654. #movie_player {
  655. position: relative;
  656. > .html5-video-container:has(video) {
  657. top: 0;
  658. bottom: 0;
  659. left: 0;
  660. right: 0;
  661. position: absolute;
  662. }
  663.  
  664. .html5-video-container > video {
  665. width: unset !important;
  666. height: 100% !important;
  667. left: 0 !important;
  668. right: 0 !important;
  669. max-height: 100%;
  670. max-width: 100%;
  671. margin: 0 auto;
  672. }
  673.  
  674. /*
  675. .ytp-iv-video-content {
  676. width: 100% !important;
  677. height: 100% !important;
  678. }
  679. */
  680.  
  681. /*
  682. // this is buggy; eg multiple chapter hover container; can be fixed by YouTube Video Resize Fix Only
  683. .ytp-chapter-hover-container[style*="width"] {
  684. width: 100% !important;
  685. }
  686. */
  687.  
  688. .html5-video-container > video[style*="top:"]:not(video[style*="top: -"]):not(video[style*="top:-"]) {
  689. top: 0 !important;
  690. }
  691.  
  692. }
  693.  
  694.  
  695. #chat:not([collapsed]) {
  696. flex: 77;
  697. }
  698.  
  699. #right-tabs {
  700. display: flex;
  701. margin: 0 !important;
  702. flex: 1;
  703. flex-direction: column;
  704.  
  705. {buildL4('is', '#material-tabs', '.tab-content')} {
  706. outline: 0;
  707. }
  708.  
  709. .tab-content {
  710. flex: 77;
  711. }
  712. }
  713.  
  714. &:not([is-two-columns_]) #primary-inner > *:not(#player) {
  715. padding: 0;
  716. }
  717.  
  718. &:not([is-two-columns_]) #primary-inner #below > *:not(ytd-live-chat-frame#chat) {
  719. padding: 0 primary-content-margin 0;
  720. }
  721.  
  722. /*
  723. #player-container-outer.ytd-watch-flexy {
  724. max-width: unset;
  725. }
  726. */
  727. }
  728.  
  729. }
  730.  
  731.  
  732.  
  733. if no-round-border {
  734.  
  735. ytd-live-chat-frame[rounded-container],
  736. ytd-live-chat-frame[rounded-container] #show-hide-button.ytd-live-chat-frame ytd-toggle-button-renderer.ytd-live-chat-frame,
  737. ytd-live-chat-frame[rounded-container] iframe.ytd-live-chat-frame,
  738. ytd-live-chat-frame[rounded-container] #show-hide-button.ytd-live-chat-frame ytd-toggle-button-renderer.ytd-live-chat-frame button.yt-spec-button-shape-next,
  739. ytd-live-chat-frame[rounded-container] #show-hide-button.ytd-live-chat-frame ytd-toggle-button-renderer.ytd-live-chat-frame button.yt-spec-button-shape-next:hover {
  740. border-radius: unset;
  741. }
  742. }
  743.  
  744.  
  745. if disable-cinematics {
  746. #cinematics.ytd-watch-flexy {
  747. display: none;
  748. }
  749. }
  750. } //
  751. contentg() {
  752.  
  753. content2c() //
  754. selector-g = '&' //
  755. if mode-for-single-col=="disabled" { //
  756. selector-g = '&:has(ytd-watch-flexy[is-two-columns_])' //
  757. } //
  758. {s(selector-g)} { //
  759. // html
  760. contentf() //
  761. } //
  762. }
  763. content361() //
  764. selectors-2col = { //
  765. "expanded-panel": join(', ',
  766. "html:not([tabview-loaded]):has(ytd-live-chat-frame#chat:not([collapsed])):has(iframe#chatframe)",
  767. "html[tabview-loaded]:has(ytd-watch-flexy[is-two-columns_]:not([fullscreen]):not([theater]))"
  768. ),
  769. "expanded-live": "html:has(ytd-live-chat-frame#chat:not([collapsed])):has(iframe#chatframe)",
  770. "expandable-live": "html:has(ytd-live-chat-frame#chat):has(iframe#chatframe)",
  771. "always": "html"
  772. } //
  773. selector-2col = selectors-2col[mode-for-two-col]
  774. selectors-k = split(', ', selector-2col)
  775. for selector-k in selectors-k {
  776. {s(selector-k)} {
  777. if no-masthead-w==1 {
  778. contentNoMasthead()
  779. }
  780. contentg() //
  781. }
  782. }
  783.  
  784. if single-col-mobile {
  785. &:has(ytd-watch-flexy:not([is-two-columns_]):not([fullscreen])) {
  786.  
  787. if no-masthead-w==2 {
  788. contentNoMasthead()
  789. }
  790. contentSingleColMobile()
  791. }
  792. }
  793. }