Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save emindeniz99/c3dc0d4717af0ae472cb8da6f2d3bf6d to your computer and use it in GitHub Desktop.
Save emindeniz99/c3dc0d4717af0ae472cb8da6f2d3bf6d to your computer and use it in GitHub Desktop.
restream guest - close chat popup
// ==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