Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Add bitrate popup remover #349

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Youtube-Ad-blocker-Reminder-Remover.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
// Enable debug messages into the console
const debugMessages = true;

// Enable the bitrate popup remover
const removeBitrate = true;

//
// CODE
//
Expand Down Expand Up @@ -90,6 +93,7 @@
if (adblocker) removeAds();
if (removePopup) popupRemover();
if (updateCheck) checkForUpdate();
if (removeBitrate) removeBitratePopup();

// Remove Them pesski popups
function popupRemover() {
Expand Down Expand Up @@ -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)
{
Expand Down