您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Auto skip ads on YouTube. Very lightweight and efficient.
当前为
// ==UserScript== // @name Auto Skip YouTube Ads // @name:vi Tự Động Bỏ Qua Quảng Cáo YouTube // @namespace https://github.com/tientq64/userscripts // @version 2.0.0 // @description Auto skip ads on YouTube. Very lightweight and efficient. // @description:vi Tự động bỏ qua quảng cáo trên YouTube. Rất nhẹ và hiệu quả. // @author https://github.com/tientq64 // @icon https://cdn-icons-png.flaticon.com/64/9639/9639954.png // @match https://www.youtube.com/* // @grant none // @license MIT // @noframes // @homepage https://github.com/tientq64/userscripts/tree/main/scripts/auto-skip-youtube-ads // ==/UserScript== function skipAd() { const hasAd = player.classList.contains('ad-showing') if (!hasAd) return const skipButton = document.querySelector('.ytp-skip-ad-button') if (skipButton) { skipButton.click() return } const video = player.querySelector('video') video.currentTime = video.duration } const player = document.querySelector('.html5-video-player') const observer = new MutationObserver(skipAd) observer.observe(player, { attributeFilter: ['class'] }) skipAd() const style = document.createElement('style') style.textContent = ` #player-ads { display: none !important; } ` document.head.appendChild(style)