您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
4.11.2023, 11:12:13
// ==UserScript== // @name YouTube Ad Blocker Bypass // @namespace Violentmonkey Scripts // @match https://www.youtube.com/* // @grant none // @version 1.01 // @author Björn // @description 4.11.2023, 11:12:13 // @license MIT // ==/UserScript== (function() { 'use strict'; function closeAdBlockerNotAllowedWindow() { // Versuche, den Button anhand des <button>-Tags und des aria-label-Attributs "Schließen" zu finden var buttons = document.querySelectorAll('button[aria-label="Schließen"]'); if (buttons.length > 0) { // Klicke auf das erste gefundene <button>-Element buttons[0].click(); } } function handleMutation(mutationsList, observer) { closeAdBlockerNotAllowedWindow(); } const observer = new MutationObserver(handleMutation); observer.observe(document.body, { childList: true, subtree: true }); // Beginne mit der Beobachtung, sobald die Seite geladen ist window.addEventListener('load', () => { closeAdBlockerNotAllowedWindow(); }); })();