Greasy Fork 还支持 简体中文。

Auto Bypass YouTube Ads

Automatically bypass YouTube ads for uninterrupted video watching.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Auto Bypass YouTube Ads
// @namespace    http://tampermonkey.net/
// @version      1.0
// @license MIT
// @description  Automatically bypass YouTube ads for uninterrupted video watching.
// @author       joybarmon329620
// @match        https://www.youtube.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Function to remove YouTube video ads
    function bypassAds() {
        // Check if an ad is present
        var adElement = document.querySelector('.video-ads');
        if (adElement) {
            // Skip the ad by clicking on the skip button or video overlay
            var skipButton = document.querySelector('.ytp-ad-skip-button-container button');
            if (skipButton) {
                skipButton.click();
            } else {
                var overlay = document.querySelector('.ytp-ad-overlay-close-button');
                if (overlay) {
                    overlay.click();
                }
            }
        }
    }

    // Call bypassAds function every 5 seconds to check for ads
    setInterval(bypassAds, 5000);
})();