Youtube Ad Skipper

Skips ads on youtube

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Youtube Ad Skipper
// @namespace    https://greasyfork.org/en/scripts/478026-youtube-ad-skipper
// @version      1
// @description  Skips ads on youtube
// @author       LEGENDBOSS123 + left paren + mastery3
// @match        *://*.youtube.com/*
// @license MIT
// @run-at       document-idle
// @grant        none
// @unwrap
// ==/UserScript==
 
function skipAdd(){
    if(document.querySelector("button.ytp-ad-overlay-close-button")){
        document.querySelector("button.ytp-ad-overlay-close-button").click();
    }
    if(document.querySelector("div.ad-showing")){
        try{    
            for(var i=0; i<document.getElementsByClassName("video-stream html5-main-video").length;i++){
                document.getElementsByClassName("video-stream html5-main-video")[i].currentTime = 999999999999999999999999999999
            }
            for(var i = 0; i<document.getElementsByClassName("ytp-ad-skip-button ytp-button").length;i++){
                document.getElementsByClassName("ytp-ad-skip-button ytp-button")[i].click()
            }
        }
        catch{
        }
    }
}
 
setInterval(skipAdd,25);