Last active
May 6, 2023 06:23
-
-
Save emindeniz99/c3dc0d4717af0ae472cb8da6f2d3bf6d to your computer and use it in GitHub Desktop.
restream guest - close chat popup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name restream guest - close chat popup | |
// @namespace http://tampermonkey.net/ | |
// @version 0.3 | |
// @description restream guest - close chat popup | |
// @author emindeniz99.com | |
// @match https://studio.restream.io/guest/* | |
// @icon https://www.google.com/s2/favicons?domain=restream.io | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
// set up the mutation observer | |
var h1observer = new MutationObserver(function (mutations, me) { | |
// mutations is an array of mutations that occurred | |
// me is the MutationObserver instance | |
var canvas = document.querySelector("[class^='PrivateChat_root']"); | |
var canvas2 = document.querySelector("[id^='MUTED_BY_VIDEO_CLIP']"); | |
document.querySelector("[class^='SourcesDeck_root__']")?.remove(); | |
// document.querySelector("[class^='Player_root__controls__']")?.remove(); | |
if (canvas) { | |
canvas.remove(); | |
} | |
if (canvas2) { | |
canvas2.remove(); | |
} | |
}); | |
// start observing | |
h1observer.observe(document, { | |
childList: true, | |
subtree: true, | |
}); | |
// Your code here... | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment