Resize Video To Window Size

Resize the video player for various sites to the window size.

  1. // ==UserScript==
  2. // @name Resize Video To Window Size
  3. // @description Resize the video player for various sites to the window size.
  4. // @author Chris H (Zren / Shade)
  5. // @namespace http://xshade.ca
  6. // @version 67
  7. // @include https://www.crunchyroll.com/*
  8. // @include https://beta.crunchyroll.com/*
  9. // @include https://static.crunchyroll.com/vilos-v2/web/vilos/player.html*
  10. // @include https://docs.google.com/file/*
  11. // @include https://drive.google.com/drive/*
  12. // @include https://drive.google.com/file/*
  13. // @include https://vimeo.com/*
  14. // @include http://onepieceofficial.com/videos.aspx*
  15. // @include http://www.onepieceofficial.com/videos.aspx*
  16. // @include https://www.youpak.com/watch*
  17. // @include https://olympics.cbc.ca/video/*
  18. // @include https://olympics.cbc.ca/divaPlayer/*
  19. // @include http://www.dailymotion.com/*
  20. // @include https://www.dailymotion.com/*
  21. // @include https://streamable.com/*
  22. // @include https://www.globaltv.com/shows/*
  23. // @include https://watch.globaltv.com/video/*
  24. // @include https://www.much.com/shows/south-park/episode/*/*/
  25. // @include http://*.ctvnews.ca/*
  26. // @include https://watch.cbc.ca/live/channel/*
  27. // @include https://watch.cbc.ca/live/*
  28. // @include https://www.ctv.ca/shows/*
  29. // @include https://www.ctv.ca/video/*
  30. // @include https://www.ctv.ca/*/Video*
  31. // @include https://www.ctv.ca/Movie/*
  32. // @include https://www.funimation.com/shows/*
  33. // @include https://www.funimation.com/player/*
  34. // @include https://www.crave.ca/*
  35. // @include https://tubitv.com/*
  36. // @include https://tv.bell.ca/*
  37. // @grant GM_addStyle
  38. // ==/UserScript==
  39.  
  40. (function() {
  41. var fixedOverlayPlayer = function(selector) {
  42. var css = selector + "{";
  43. css += "position: fixed;";
  44. css += "top: 0;";
  45. css += "left: 0;";
  46. css += "right: 0;";
  47. css += "bottom: 0;";
  48. css += "}";
  49. GM_addStyle(css);
  50. };
  51.  
  52. var absoluteTopPlayer = function(selector, staticSelectors) {
  53. var css = selector + "{";
  54. css += "position: absolute;";
  55. css += "top: 0;";
  56. css += "left: 0;";
  57. css += "width: 100vw;";
  58. css += "height: 100vh;";
  59. css += "padding: 0;";
  60. css += "margin: 0;";
  61. css += "}";
  62. css += "body {";
  63. css += "margin-top: 100vh;";
  64. css += "margin-top: 100vh;";
  65. css += "padding-top: 0;";
  66. css += "}";
  67. if (staticSelectors) {
  68. css += staticSelectors + "{";
  69. css += "position: static";
  70. css += "}";
  71. }
  72. GM_addStyle(css);
  73. };
  74.  
  75. var movedTopPlayer = function(videoBoxElement) {
  76. document.body.insertBefore(videoBoxElement, document.body.firstChild);
  77. videoBoxElement.style.width = '100%';
  78. videoBoxElement.style.height = '100%';
  79. videoBoxElement.style.backgroundColor = '#000';
  80. };
  81.  
  82. var waitFor = function(selector, callback) {
  83. var tick = function(){
  84. var e = document.querySelector(selector);
  85. if (e) {
  86. callback(e);
  87. } else {
  88. setTimeout(tick, 100);
  89. }
  90. };
  91. tick();
  92. };
  93.  
  94. var bindJWPlayerSpacebar = function() {
  95. window.addEventListener('keydown', function(e){
  96. if (e.key == ' ' && e.target == document.body) {
  97. var video = document.querySelector('.jwplayer video')
  98. if (video) {
  99. e.preventDefault();
  100. if (video.paused) {
  101. video.play()
  102. } else {
  103. video.pause()
  104. }
  105. }
  106. }
  107. });
  108. };
  109.  
  110. var urlMatch = function(regexStr) {
  111. regexStr = regexStr.replace(/\//g, '\\/'); // Auto escape forward slashes to make url regexes more legible.
  112. var regex = new RegExp(regexStr);
  113. return regex.exec(window.location.href);
  114. };
  115.  
  116. if (document.location.host.endsWith('crunchyroll.com')) {
  117. // console.log('doc loc', document.location)
  118. // console.log('win loc', window.location)
  119. if (document.location.hostname == 'www.crunchyroll.com' || document.location.hostname == 'beta.crunchyroll.com') {
  120. var rvtwsHeaderClass = 'rvtws-header-hidden'
  121. var css = ''
  122. css += '.erc-header.'+rvtwsHeaderClass+' { position: absolute; }'
  123. css += '.erc-header.'+rvtwsHeaderClass+' .header-content { opacity: 0; transition: opacity: 0.1s; }'
  124. css += '.erc-header.'+rvtwsHeaderClass+' .header-content:hover { opacity: 1; }'
  125. css += '.erc-watch-episode-layout .video-player-wrapper { max-height: 100vh; height: 100vh; display: flex; }'
  126. // css += '.erc-watch-episode-layout .video-player { height: 56.25vw; align-self: center; }'
  127. GM_addStyle(css)
  128. function updateHeader() {
  129. var ercHeader = document.querySelector('.erc-header')
  130. var ercWatchEpisode = document.querySelector('.erc-watch-episode')
  131. if (ercHeader) {
  132. if (ercWatchEpisode) {
  133. ercHeader.classList.add(rvtwsHeaderClass)
  134. } else {
  135. ercHeader.classList.remove(rvtwsHeaderClass)
  136. }
  137. }
  138. }
  139. window.addEventListener('popstate', updateHeader)
  140. setInterval(updateHeader, 1000)
  141. updateHeader()
  142. } else if (document.location.hostname == 'static.crunchyroll.com' && document.location.pathname == '/vilos-v2/web/vilos/player.html') {
  143. GM_addStyle('#vilosRoot { height: 100vh !important; }');
  144. GM_addStyle('#vilosControlsContainer > div:first-child { margin-top: 3.75rem; }'); // Make room for header
  145. }
  146. } else if (document.location.href.startsWith('https://docs.google.com/file/')) {
  147. fixedOverlayPlayer('#drive-viewer-video-player-object-0');
  148. var css = 'body:not(:hover) .ytp-chrome-bottom { opacity: 0 !important; }';
  149. css += 'body:not(:hover) .drive-viewer-toolstrip { opacity: 0 !important; }';
  150. GM_addStyle(css);
  151. } else if (document.location.href.startsWith('https://drive.google.com/')) {
  152. fixedOverlayPlayer('.drive-viewer-video-player');
  153. var css = '.drive-viewer-toolstrip { opacity: 0 !important; }';
  154. css += '.drive-viewer-toolstrip:hover { opacity: 1 !important; }';
  155. GM_addStyle(css);
  156. } else if (document.location.href.startsWith('https://vimeo.com/')) {
  157. if (! /\/\d+/.exec(document.location.pathname))
  158. return;
  159. var css = '.js-player_area-wrapper, .player_area-wrapper, .player_area, .player_container, .player, .video-wrapper, .video, .video * { width: 100vw !important; height: 100vh !important; max-height: 100vh !important; }';
  160. css += '.vp-player-layout { left: 0 !important; top: 0 !important; width: 100vw !important; height: 100vh !important; }';
  161. css += '.clip_main > *:not(.player_area-wrapper) { margin-top: 70px; }';
  162. css += '.VimeoBrand_ColorRibbon, .body_ribbon, .topnav_desktop, .topnav_mobile { position: absolute; top: 100vh; width: 100%; }';
  163. css += '.topnav_desktop { top: calc(100vh + 5px); }';
  164. GM_addStyle(css);
  165.  
  166. // autoplay
  167. function tick() {
  168. var e = document.querySelector('button.play[aria-label="Play"]');
  169. if (e) {
  170. e.click();
  171. } else {
  172. setTimeout(tick, 100);
  173. }
  174. }
  175. setTimeout(tick, 100);
  176. } else if (document.location.host.endsWith('onepieceofficial.com')) {
  177. movedTopPlayer(document.querySelector('#FUNimationVideo'));
  178. } else if (document.location.host.endsWith('youpak.com')) {
  179. movedTopPlayer(document.querySelector('.videoWrapper'))
  180. var css = 'body > .container { padding-top: 60px; }'
  181. css += '.navbar-fixed-top { position: absolute; top: 100vh; }'
  182. css += 'body { padding-top: 0; }'
  183. GM_addStyle(css)
  184. } else if (document.location.host == 'olympics.cbc.ca') {
  185. console.log(document.location.pathname, document.location.pathname.match(/\/video\/([^\/]+)\/([^\/]+)(\/?)/))
  186. if (document.location.pathname.match(/\/video\/([^\/]+)\/([^\/]+)(\/?)/)) {
  187. var css = '.cbc-video--player-wrapper { position: static !important; }'
  188. css += '.cbc-video {'
  189. css += ' position: absolute !important;'
  190. css += ' top: 0 !important;'
  191. css += ' left: 0 !important;'
  192. css += ' padding: 0px !important;'
  193. css += ' margin: 0px !important;'
  194. css += ' width: 100% !important;'
  195. css += ' height: 100vh !important;'
  196. css += '}'
  197. css += 'figure.cbc-video--thumb-wrapper, a[data-js-hook="play-video"] picture img { max-height: 100vh !important; }'
  198. css += '.or-podium .or-box { position: static !important; }'
  199. css += '.or-podium .col-xs-1, .or-podium .col-sm-1, .or-podium .col-md-1, .or-podium .col-lg-1, .or-podium .col-xs-2, .or-podium .col-sm-2, .or-podium .col-md-2, .or-podium .col-lg-2, .or-podium .col-xs-3, .or-podium .col-sm-3, .or-podium .col-md-3, .or-podium .col-lg-3, .or-podium .col-xs-4, .or-podium .col-sm-4, .or-podium .col-md-4, .or-podium .col-lg-4, .or-podium .col-xs-5, .or-podium .col-sm-5, .or-podium .col-md-5, .or-podium .col-lg-5, .or-podium .col-xs-6, .or-podium .col-sm-6, .or-podium .col-md-6, .or-podium .col-lg-6, .or-podium .col-xs-7, .or-podium .col-sm-7, .or-podium .col-md-7, .or-podium .col-lg-7, .or-podium .col-xs-8, .or-podium .col-sm-8, .or-podium .col-md-8, .or-podium .col-lg-8, .or-podium .col-xs-9, .or-podium .col-sm-9, .or-podium .col-md-9, .or-podium .col-lg-9, .or-podium .col-xs-10, .or-podium .col-sm-10, .or-podium .col-md-10, .or-podium .col-lg-10, .or-podium .col-xs-11, .or-podium .col-sm-11, .or-podium .col-md-11, .or-podium .col-lg-11, .or-podium .col-xs-12, .or-podium .col-sm-12, .or-podium .col-md-12, .or-podium .col-lg-12 { position: static; }'
  200. css += 'body:not(.cbc-main-page) { padding-top: 100vh; }'
  201. GM_addStyle(css);
  202. var playVideoButton = document.querySelector('a[data-js-hook="play-video"]')
  203. if (playVideoButton) {
  204. playVideoButton.click()
  205. }
  206. } else if (document.location.pathname.startsWith('/divaPlayer')) {
  207. var css = '#videoContainer:not(:hover) > .caption { opacity: 0; }'
  208. css += '#videoContainer:not(:hover) .controlbar-diva { opacity: 0 !important; }'
  209. css += '#videoContainer:not(:hover) #icon-menu-diva { opacity: 0; }'
  210. css += '#videoContainer:not(:hover) diva-simple-controls { opacity: 0 !important; }'
  211. GM_addStyle(css);
  212. } else {
  213. return; // Keep scrollbars
  214. }
  215. } else if (false && document.location.host.endsWith('www.dailymotion.com')) {
  216. var css = '#player:not(:hover) .dmp_will-transition.dmp_is-transitioned--fadeinslide { opacity: 0; }';
  217. if (document.location.pathname.startsWith('/playlist')) {
  218. css += '#player_container { height: 100vh!important; width: 100vw!important; }';
  219. css += '#playerv5-iframe { width: 100% !important; height: 100% !important; }'; // playlists
  220. css += '.sd_header.sd_header--fixed { top: 100vh; position: absolute; }';
  221. css += '#content { margin-top: 60px; }';
  222. movedTopPlayer(document.querySelector('#player_container'));
  223. absoluteTopPlayer('#player_container');
  224.  
  225. GM_addStyle(css);
  226.  
  227. } else if (document.location.pathname.startsWith('/video')) {
  228. //css +='.main-container-player { display: none; }';
  229. //css += '#player { height: 100vh!important; width: 100vw!important; }';
  230. css += '.Player { height: 100vh!important; width: 100vw!important; }';
  231. css += '.Player { top: 0!important; left: 0!important; }';
  232. css += 'header { position: absolute!important; top: 100vh !important; }';
  233. css += 'footer { margin-top: 50px; }';
  234. css += 'div[class^="Video__placeholder___"] { margin-top: -180px; height: 100vh!important; }';
  235. GM_addStyle(css);
  236. document.addEventListener('load',function(){
  237. movedTopPlayer(document.querySelector('.Player'));
  238. });
  239. }
  240.  
  241. } else if (document.location.host.endsWith('streamable.com')) {
  242. if (document.location.pathname == '/') {
  243. return;
  244. }
  245. var css = '#player-content, #player.container .media-container, #player.container #filler, #player.container .player { max-width: 100% !important; width:100%; }';
  246. css += '#player.container #filler { padding-bottom: 100vh !important; }';
  247. css += '.player { background: #000; }';
  248. css += '#player.container .player { display: flex; }';
  249. css += '.player, #player.container video { max-height: 100vh; object-fit: contain; }';
  250. css += '#player > div[style="height:15px;"] { display: none; }';
  251. css += '#player.container .topbanner { display: none; }';
  252. GM_addStyle(css);
  253. } else if (document.location.host.endsWith('globaltv.com')) {
  254. var css = 'html, body, #root, .App, .Video {'
  255. css += 'min-height: 100%; height: 100%; max-height: 100%;'
  256. css += 'min-width: 100%; width: 100%; max-width: 100%;'
  257. css += '}'
  258. css += 'body { overflow-y: auto; }'
  259. GM_addStyle(css);
  260. waitFor('.jwplayer', function(jwPlayerElement) {
  261. waitFor('.jwplayer video', function(videoElement) {
  262. setTimeout(function() {
  263. videoElement.muted = false;
  264. }, 200)
  265. });
  266. });
  267. bindJWPlayerSpacebar();
  268. } else if (document.location.host.endsWith('much.com')) {
  269. var css = '#TopVideoWidgetSection, #ShowNav, #MainHeader, #MastHeadTakeover { display: none; }';
  270. css += '#ShowTop #PlayerWrapper, #ShowTop .container-fluid, #ShowTop #ShowInfo, #ShowTop {';
  271. css += 'margin: 0 !important; padding: 0 !important;';
  272. css += 'width: 100vw !important; height: 100vh !important; max-width: 100vw !important; max-height: 100vh !important;';
  273. css += '}';
  274. css += '#ShowTop #ShowInfo #EpisodeInfo { margin-top: 0 !important; }';
  275. css += '.jwplayer { max-height: 100vh; }';
  276. css += '#EpisodeInfo .new-episodes { display: none !important; }';
  277. GM_addStyle(css);
  278. } else if (document.location.host.endsWith('ctvnews.ca')) {
  279. if (window.location.pathname == '/latest') {
  280. // Redirect to latest video
  281. document.body.style.opacity = "0"
  282. document.documentElement.style.transition = "background 0.4s"
  283. document.documentElement.style.background = "#000"
  284. var latestVideoLink = document.querySelector('.mainnavigation + .drop_down + script + .drop_down > .drop_down_element_container > div > div > ul > li:first-child > a')
  285. if (latestVideoLink) {
  286. window.location.href = latestVideoLink.href
  287. }
  288. } else if (window.location.pathname == '/video') {
  289. var contentWrapper = document.querySelector('body > .content > .video-header > .content-wrapper')
  290. if (contentWrapper) {
  291. var header = document.querySelector('body > header')
  292. document.body.insertBefore(contentWrapper, header)
  293. var mediaplayerdiv = document.querySelector('#mediaplayerdiv')
  294.  
  295. contentWrapper.querySelector('.topname').style.display = "none"
  296. contentWrapper.style.width = "100%"
  297. contentWrapper.style.height = "100vh"
  298. contentWrapper.style.maxWidth = "100vw"
  299. contentWrapper.style.maxHeight = "100vh"
  300. contentWrapper.style.background="#000"
  301.  
  302. function onWindowResize() {
  303. var viewportWidth = document.documentElement.clientWidth
  304. var viewportHeight = document.documentElement.clientHeight
  305. var translate = "translate(" + ((viewportWidth - 960)/2) + "px, " + ((viewportHeight - 540)/2) + "px)"
  306. var scale = "scale(" + Math.min(viewportWidth / 960, viewportHeight / 540) + ")"
  307. mediaplayerdiv.style.transform = translate + " " + scale
  308. }
  309. window.addEventListener('resize', onWindowResize);
  310. onWindowResize();
  311. return; // Keep scrollbars
  312. }
  313. } else {
  314. return; // Keep scrollbars
  315. }
  316. } else if (document.location.host.endsWith('watch.cbc.ca')) {
  317. var css = '#masthead { position: absolute; z-index: 1; width: 100%; opacity: 0; transition: opacity 250ms ease-in-out; }';
  318. css += '#masthead:hover { opacity: 1; }';
  319. css += '.regional-channel .container { max-width: 100%; }';
  320. css += '.player-container.live, .jwplayer.jw-flag-aspect-mode { max-height: 100vh; }';
  321. css += '.jwplayer.jw-stretch-uniform video { object-fit: contain !important; }';
  322. css += '.regional-channel footer.regional-channel-footer, section.content-article.live { padding: 10px 0; }';
  323. css += 'section.content-article.live-premium { display: none; }';
  324. css += '.upgrade-banner, .live-premium, iframe.zEWidget-launcher { display: none; }';
  325. css += '.upgrade-banner + .app-container.with-banner-large { top: 0; }';
  326. css += '.content-article { padding-top: 0; padding-bottom: 0; }';
  327. css += '.content-section.live-detail-layout { max-width: 100%; }';
  328. GM_addStyle(css);
  329. } else if (document.location.host.endsWith('www.ctv.ca')) {
  330. var css = ''
  331. css += 'header.navigation { opacity: 0; position: fixed; }'
  332. css += 'header.navigation:hover { opacity: 1; }'
  333. css += '.main { padding-top: 0 !important; }'
  334. css += '#vidi-player-standalone { margin: 0vw 0vw 0; }'
  335. css += 'div[class*="VidiPlayerstyles__VidiPlayerStandAloneContainer"] { margin: 0vw 0vw 0; }'
  336. css += '.jwplayer.jw-flag-aspect-mode { min-height: 100vh !important; height: 100vh !important; max-height: 100vh !important; }'
  337. css += 'div[class*="BrowserNotificationstyles"] { display: none; }'
  338. css += 'div[class^="ArrowBackstyles__ButtonContainer"] { display: none; }'
  339.  
  340. css += 'div[class^="globalStyles__MainContainer"] { padding-top: 0 !important; }'
  341. css += 'div[class^="VidiPlayerstyles__VidiPlayerPageContainer"] { margin: 0 !important; }'
  342. GM_addStyle(css);
  343. waitFor('.jwplayer', function(jwPlayerElement) {
  344. waitFor('.jwplayer video', function(videoElement) {
  345. setTimeout(function() {
  346. videoElement.muted = false;
  347. }, 200)
  348. });
  349. });
  350. bindJWPlayerSpacebar();
  351. var reverseEpisodeOrder = [
  352. '/shows/the-daily-show-with-trevor-noah',
  353. ]
  354. waitFor('ul[class*="Episodesstyles__EpisodeList"]', function(ul) {
  355. if (reverseEpisodeOrder.indexOf(document.location.pathname) >= 0) {
  356. for (var i = 0; i < ul.children.length; i++) {
  357. ul.insertBefore(ul.children[i], ul.firstChild)
  358. }
  359. }
  360. });
  361. setInterval(function(){
  362. var e = document.querySelector('#__next div:not(.App)')
  363. if (e) {
  364. var h2 = e.querySelector('h2')
  365. if (h2 && h2.textContent == 'An unexpected error has occurred.') {
  366. // CTV doesn't like uBlockOrigin, so reload the page to workaround the AJAX React links breaking.
  367. window.location.reload()
  368. }
  369. }
  370. }, 100);
  371. } else if (document.location.host.endsWith('funimation.com')) {
  372. console.log('funimation.com')
  373. var videoBoxElement = document.querySelector('.video-player-section .video-player-container');
  374. console.log('videoBoxElement', videoBoxElement)
  375. if (videoBoxElement) {
  376. movedTopPlayer(videoBoxElement);
  377. videoBoxElement.classList.remove('col-md-10');
  378.  
  379. var css = 'html, body { width: 100%; height: 100%; }';
  380. css += '.video-player-container { width: 100vw !important; height: 100vh !important; }';
  381. css += '#funimation-main-site-header { position: absolute; top: 100vh; }';
  382. GM_addStyle(css);
  383. } else {
  384. console.log('location', document.location)
  385. waitFor('#brightcove-player', function(player){
  386. console.log('player', player)
  387. player.removeAttribute('muted')
  388. waitFor('.vjs-mute-control.vjs-vol-0', function(muteButton){
  389. console.log('muteButton', muteButton)
  390. muteButton.click()
  391. })
  392. })
  393. }
  394. } else if (document.location.host.endsWith('crave.ca')) {
  395. if (document.location.pathname.startsWith('/live')) return;
  396. var videoBoxElement = document.querySelector('video-player');
  397. if (!videoBoxElement) return;
  398. var css = 'footer, .back-button-wrapper, #mega-menu { display: none !important; }';
  399. css += '.container-site-margin { margin-left: 0; margin-right: 0; }';
  400. css += '.web-videoplayer { margin: 0; }';
  401. css += 'html .jwplayer.jw-flag-aspect-mode { height: 100vh !important; }';
  402. GM_addStyle(css);
  403. } else if (document.location.host.endsWith('tubitv.com')) {
  404. var css = 'header { transition: transform .3s, opacity .3s !important; }';
  405. css += 'header.hide-header { opacity: 0 !important }';
  406. css += 'header.hide-header:hover { opacity: 1 !important; }';
  407. css += 'header + div > div:first-child > div:first-child > div:nth-child(2) { top: 0 !important; left: 0 !important; width: 100% !important; height: 100vh !important; }';
  408. css += 'header + div > div:first-child > div:first-child > div:nth-child(2) > div:first-child > section { padding-top: 0 !important; height: 100vh !important; }';
  409. css += 'header + div > div:first-child > div:first-child > div:nth-child(2) > div:first-child > section > div > div:nth-child(2) > div:first-child { background-image: linear-gradient(0deg,rgba(0,0,0,0), rgba(0,0,0,0.25) 30%, rgba(0, 0, 0, 1) 90%); }';
  410. css += 'header + div > div:first-child > div:first-child > div:nth-child(2) > div:first-child > section > div > div:nth-child(2) > div:nth-child(2) { background-image: linear-gradient(180deg,rgba(0,0,0,0), rgba(0,0,0,0.25) 30%, rgba(0, 0, 0, 1) 90%); }';
  411. css += '#captionsComponent > span { background: none !important; font-size: 3rem !important;';
  412. css += 'text-shadow: 0 0 0.5rem #000, 0 0 0.5rem #000, 0 0 0.5rem #000, 0 0 0.5rem #000, 0 0 0.5rem #000, 0 0 0.5rem #000, 0 0 0.5rem #000, 0 0 0.5rem #000, 0 0 0.5rem #000, 0 0 0.5rem #000, 0 0 0.5rem #000, 0 0 0.5rem #000, 0 0 0.5rem #000, 0 0 0.5rem #000;';
  413. css += '}';
  414. GM_addStyle(css);
  415. var updateHeader = function() {
  416. var header = document.querySelector('header')
  417. if (header) {
  418. var video = document.querySelector('video')
  419. if (video) {
  420. header.classList.add('hide-header')
  421. } else {
  422. header.classList.remove('hide-header')
  423. }
  424. }
  425. }
  426. updateHeader()
  427. setInterval(updateHeader, 1000)
  428. } else if (document.location.host.endsWith('tv.bell.ca')) {
  429. if (!document.location.pathname.startsWith('/watch/')) return;
  430. //let videoBoxElement = document.querySelector('video[playsinline]');
  431. //if (!videoBoxElement) return;
  432. waitFor('video[playsinline]', function(videoBoxElement){
  433. let css = ''
  434. css += '.bg-greyscale-black.w-capped { position: absolute !important; top: calc((var(--headerHeight) + 100vh) * -1 ) !important; height: 100vh !important; }';
  435. css += '.bg-greyscale-black.w-full { position: absolute !important; top: -100vh !important; height: 100vh !important; }';
  436. css += 'body { padding-top: 100vh !important; }';
  437. css += '[class*="&_.bmpui-ui-subtitle-label]:!bg-greyscale-black-70"].h-full.w-full.justify-center { max-width: 100% !important; }'
  438. css += 'header[class="bg-greyscale-03 virgin:bg-tertiary-medium flex"][aria-label="Global"] { display: none !important; }'
  439. console.log('css', css)
  440. GM_addStyle(css);
  441. })
  442. }
  443.  
  444. GM_addStyle('html::-webkit-scrollbar { width: 0; height: 0; } body::-webkit-scrollbar { width: 0; height: 0; }');
  445. GM_addStyle('html { scrollbar-width: none; } body { scrollbar-width: none; }');
  446. })();