From 95e934e94d70e2d9d81991c1382d20c2b528589d Mon Sep 17 00:00:00 2001 From: Simone Bisi Date: Fri, 19 Jan 2024 16:51:59 +0100 Subject: [PATCH] Add bitrate popup remover --- Youtube-Ad-blocker-Reminder-Remover.user.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Youtube-Ad-blocker-Reminder-Remover.user.js b/Youtube-Ad-blocker-Reminder-Remover.user.js index 325415d..4335249 100644 --- a/Youtube-Ad-blocker-Reminder-Remover.user.js +++ b/Youtube-Ad-blocker-Reminder-Remover.user.js @@ -29,6 +29,9 @@ // Enable debug messages into the console const debugMessages = true; + // Enable the bitrate popup remover + const removeBitrate = true; + // // CODE // @@ -90,6 +93,7 @@ if (adblocker) removeAds(); if (removePopup) popupRemover(); if (updateCheck) checkForUpdate(); + if (removeBitrate) removeBitratePopup(); // Remove Them pesski popups function popupRemover() { @@ -316,6 +320,20 @@ if (debugMessages) console.log("Remove Adblock Thing: Removed page ads (✔️)"); } + // Removes the bitrate popup + function removeBitratePopup(){ + setInterval(function(){ + var elements = document.getElementsByClassName("style-scope ytd-popup-container"); + while(elements.length > 0){ + elements[0].parentNode.removeChild(elements[0]); + } + var elements = document.getElementsByClassName("style-scope ytd-menu-popup-renderer"); + while(elements.length > 0){ + elements[0].parentNode.removeChild(elements[0]); + } + }, 500); + } + // Unpause the video Works most of the time function unPauseVideo(video) {