Clean view for SHOWROOM

get rid of elements except the video-screen on SHOWROOM.

// ==UserScript==
// @name           Clean view for SHOWROOM
// @name:ja        SHOWROOMの装飾を非表示 
// @namespace
// @version        1.01
// @description    get rid of elements except the video-screen on SHOWROOM.
// @description:ja SHOWROOMのUIを映像以外非表示にします。
// @match          https://www.showroom-live.com/r/*
// @author         applepi
// @grant          none
// @license        GPL-3.0 License
// @namespace https://greasyfork.org/users/1502726
// ==/UserScript==

(function() {
    'use strict';

    const targetSelector = 'body.is-pc.is-room-body > #__nuxt > div > div > div.l-main > div.room-wrapper > div.room-video-wrapper > div.st-loading.room-video';
    let done = false;

    const tryKeepOnlyVideo = () => {
        if (done) return;
        const keepEl = document.querySelector(targetSelector);
        if (keepEl) {
            done = true;
            keepEl.remove();
            document.body.innerHTML = '';
            document.body.appendChild(keepEl);

            document.body.style.backgroundColor = 'black';
        }
    };

    const observer = new MutationObserver(tryKeepOnlyVideo);
    observer.observe(document.body, { childList: true, subtree: true });

    tryKeepOnlyVideo();
})();