Skip to content

Instantly share code, notes, and snippets.

Last active November 16, 2023 15:22
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
UserScript to Remove YouTube Statement Banners
// ==UserScript==
// @name Fuck YouTube Theme banners
// @namespace
// @version 1.0
// @description Removes YouTube Theme banners
// @author Tobias "CodeF0x" Oettl
// @match *://**
// @grant none
// ==/UserScript==
(() => {
// remove on initial page load
const target = document.querySelector('#content');
const config = { attributes: false, childList: true, subtree: true };
const callback = (mutationList, observer) => {
const observer = new MutationObserver(callback);
observer.observe(target, config);
function removeBanner() {
const banner = document.querySelector('ytd-statement-banner-renderer');
if (banner) {
Copy link

CodeF0x commented Nov 16, 2023

The callback fires like a billion times if you just move the mouse, but that's a small price to get rid of the fucking banner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment