Skip to content

Instantly share code, notes, and snippets.

@cosmicqbit
Created October 11, 2022 05:24
Show Gist options
  • Save cosmicqbit/8034bc83ed8af837356975830a27a24b to your computer and use it in GitHub Desktop.
Save cosmicqbit/8034bc83ed8af837356975830a27a24b to your computer and use it in GitHub Desktop.
Unsubscribe from all YouTube channels in one click.
var i = 0; var count = document.querySelectorAll("ytd-channel-renderer:not(.ytd-item-section-renderer)");
myTimer();
function myTimer () { if (count == 0) return; el = document.querySelector('.ytd-subscribe-button-renderer');
el.click(); setTimeout(function () { var unSubBtn = document.getElementById("confirm-button").click();
i++; count--;
console.log(i + " unsubscribed");
console.log(count + " remaining");
setTimeout(function () { el = document.querySelector("ytd-channel-renderer");
el.parentNode.removeChild(el); myTimer(); }, 250); }, 250); }
@cosmicqbit
Copy link
Author

cosmicqbit commented Oct 11, 2022

Instructions

  • Open this link in your browser.
  • Open the browser console.
  • Paste the code snippet.
  • Press enter.
  • Boom, all channels unsubscribed 🥳

⚠️ Be warned, the action is irreversible.

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