您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove the anti-adblocker popup on Youtube
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.gf.qytechs.cn/scripts/499765/1405874/Youtube%20Anti-Adblock%20Killer.js
// ==UserScript== // @name Youtube Anti-Adblock Killer // @namespace https://anda.ninja/ // @version 1.0.2 // @description Remove the anti-adblocker popup on Youtube // @author Axel Andaroth // @match https://www.youtube.com/* // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAC1JREFUWEft0EERAAAAAUH6lxbDZxU4s815PffjAAECBAgQIECAAAECBAgQIDAaPwAh6O5R/QAAAABJRU5ErkJggg== // @grant none // ==/UserScript== (function() { 'use strict'; console.log('Youtube Anti-Adblock Killer by Axel Andaroth') let video = document.querySelector('video') // find the video player in page let overlay, closeBtn, noRenderer, playerContainerOuter = null // DOM const interval = setInterval(() => { // lazy repeat (^: const dialogs = document.querySelectorAll('tp-yt-paper-dialog') || [] // find all dialogs if (Array.from(dialogs).length) console.log('dialogs opened:',dialogs) // find the anti-adblock one, use the expression you like: if (!playerContainerOuter) playerContainerOuter = document.querySelector('div.player-container-outer') // find outer player playerContainerOuter.style.visibility = "initial" // force visible player if (!noRenderer) noRenderer = document.querySelector('yt-playability-error-supported-renderers') // find player warning noRenderer.style.display = "none" // hide player warning const antiAdBlockDialog = Array.from(dialogs).find((d) => ( !!d.innerHTML.toLowerCase().includes("bloqueur de publicité") || !!d.innerHTML.toLowerCase().includes("autoriser youtube ads") || !!d.innerHTML.toLowerCase().includes("blockers are not allowed") || !!d.innerHTML.toLowerCase().includes("blockers violate") || !!d.innerHTML.toLowerCase().includes("allow youtube ads") )) // endof find if (!!antiAdBlockDialog) { // there is an anti-adblock dialog antiAdBlockDialog.style.display = "none" // hide the popup if (!overlay) overlay = document.querySelector('tp-yt-iron-overlay-backdrop') // get overlay else overlay.style.display = "none" // hide overlay if (!video) video = document.querySelector('video') // find the video player in page video.play() // force play if (!closeBtn) closeBtn = antiAdBlockDialog.querySelector('div.yt-spec-touch-feedback-shape__fill') // find close button else { closeBtn.click() // press the close button to prevent popup come back antiAdBlockDialog.remove() } } // endof adblock dialog },1000) // endof interval })(); /* COMMUNICATION We don't want to pay a Premium because we will still see sponsored contents because YT doesn't compensate their creators sufficiently THANK YOU */
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址