Fullscreen Stream Embed Fix

Make the iframe fill stream-wrap and remove stream controls, runs on load and URL hash change.

2024-06-30 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

// ==UserScript==
// @name        Fullscreen Stream Embed Fix
// @namespace   Violentmonkey Scripts
// @match       https://www.destiny.gg/bigscreen
// @grant       none
// @version     1.1
// @author      777mmHg
// @description Make the iframe fill stream-wrap and remove stream controls, runs on load and URL hash change.
// @license     GNU General Public License, version 2
// ==/UserScript==

(function() {
    'use strict';

    function removeStreamControls() {
        const streamControls = document.querySelector('.stream-controls');
        if (streamControls) {
            streamControls.remove();
        }
    }

    function setStreamWrapStyles() {
        const streamWrap = document.querySelector('.stream-panel__wrap');
        if (streamWrap) {
            streamWrap.style.padding = '0';
            streamWrap.style.backgroundColor = 'transparent';
        }
    }

    function applyCustomizations() {
        removeStreamControls();
        setStreamWrapStyles();
    }

    // Run the functions when the page is fully loaded
    window.addEventListener('load', applyCustomizations);

    // Run the functions when the hash changes
    window.addEventListener('hashchange', applyCustomizations);

})();