Untitled

 avatar
unknown
javascript
4 years ago
921 B
7
Indexable
// ==UserScript==
// @name         YT UW
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://www.youtube.com/*
// @icon         https://www.google.com/s2/favicons?domain=youtube.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    window.nsWidth = "1920px";

    window.onload = function () {
        let changeInt = setInterval(() => {
            /* Video dimensions */
            document.querySelector(".html5-video-container video").style = `width: ${ window.nsWidth }; height: auto;`;

            /* Container max width */
            document.querySelector("ytd-watch-flexy[flexy] #columns.ytd-watch-flexy").style = `max-width: calc(${ window.nsWidth } + (var(--ytd-watch-flexy-sidebar-width) + (3 * var(--ytd-margin-6x))));`;
        }, 500);
    }
})();
Editor is loading...