How to remove the Statement / Theme Banners from YouTube

YouTube banner in question

After years of these super annoying YouTube banners, I hacked together a little script that removes them from the DOM upon finding one.

To run this, you need to install something like Tampermonkey (available for Firefox and Chrome) and create a new userscript with the following code:

// ==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) {

If you found an issue or a way to make it not run a thousend times when you just hover your mouse about something, add a comment on GitHub . You can also add a comment if the script stopped working due to YouTube doing some breaking changes.