Greasy Fork 支持简体中文。

Youtube Anti-Adblock Bypasser

Removes the youtube anti-adblock popup.

// ==UserScript==
// @name        Youtube Anti-Adblock Bypasser
// @namespace   Violentmonkey Scripts
// @match       https://www.youtube.com/watch
// @grant       none
// @version     1.0
// @license MIT
// @author      mr.akz
// @description Removes the youtube anti-adblock popup.
// ==/UserScript==

setInterval(function() {
    let checkElement = document.getElementsByClassName('style-scope ytd-popup-container');
    if(checkElement.length > 0){
        let elements = document.getElementsByClassName('opened');
        while(elements.length > 0){
            elements[0].parentNode.removeChild(elements[0]);
        }
        let elements2 = document.getElementsByClassName('style-scope ytd-popup-container');
        while(elements2.length > 0){
            elements2[0].parentNode.removeChild(elements2[0]);
        }
    }
}, 1000); // checks every 1000 milliseconds (1 second)