Visually hide deleted Brand Accounts you're a Manager of in YouTube, stuck in this invalid state.
MIT License
This Tampermonkey script removes "invalid" YouTube channels from the YouTube Brand Accounts dashboard, where the one is a manager of a removed channel
https://www.youtube.com
Google, please fix:
When a user accepts being a channel manager, there's no direct way to opt-out without accessing the managed account. If the channel is removed in the future, the manager can be left in an invalid state, unable to remove the channel from their YouTube Studio dashboard. This script visually removes such edge cases.
Install the user script manager extension for your browser if you haven't already
Click on the extension icon in your browser toolbar and select "Create a new script"
Replace any existing code with the script provided below:
// ==UserScript==
// @name YouTube Dead Channel Remover
// @namespace http://tampermonkey.net/
// @version 2024-06-27
// @description Visually removes managed brand accounts that have been removed
// @author Tremeschin
// @match *://www.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Remove non-hidden "#studio-redirect" accounts
function removeDeadChannels() {
document.querySelectorAll('ytd-account-item-renderer').forEach(item => {
if (!item.querySelector('#studio-redirect').hasAttribute('hidden')) {
item.remove();
}
});
}
// Dynamically call the main method as the DOM updates
const observer = new MutationObserver(removeDeadChannels);
observer.observe(document.body, {childList: true, subtree: true});
})();
Save the script and reload any YouTube pages
Send feedbacks to Google for a proper fix