Make your own YouTube AdBlocker for FREE!

Hello! Are you tired of watching youtube ads? Why not make your own adblocker for free!
Let’s start!

setInterval(function(){

var skipButton = document.getElementsByClassName(“ytp-ad-skip-button”);
if(skipButton != undefined && skipB…


This content originally appeared on DEV Community and was authored by CristoferK

Hello! Are you tired of watching youtube ads? Why not make your own adblocker for free!
Let's start!

setInterval(function(){

    var skipButton = document.getElementsByClassName("ytp-ad-skip-button");
    if(skipButton != undefined && skipButton.length > 0) {
            console.log("Ad detected");
            skipButton[0].click();
    }

}, 3000)
{

    "manifest_version": 2,
    "name": "Youtube Ad Skiper",
    "description": "This extension will help you to watch your favorite videos, without the intervention of Advertisements!",
    "version": "1.0",
    "author": "CristoferK",
    "icons":{
        "600":"logo.png"
    },

    "browser_action":{
        "default_popup":"popup.html"
    },

    "content_scripts": [{
        "js": ["script.js"],
        "run_at": "document_idle",
        "matches": ["<all_urls>"]
    }],
    "permissions": [
        "tabs",
        "activeTab"
    ]

}

Don't forget to subscribe to my YouTube channel for programming tutorials: https://www.youtube.com/channel/UCFzeA3xC-_i4ZT-XwcwsJxQ


This content originally appeared on DEV Community and was authored by CristoferK


Print Share Comment Cite Upload Translate Updates
APA

CristoferK | Sciencx (2021-04-10T10:14:05+00:00) Make your own YouTube AdBlocker for FREE!. Retrieved from https://www.scien.cx/2021/04/10/make-your-own-youtube-adblocker-for-free/

MLA
" » Make your own YouTube AdBlocker for FREE!." CristoferK | Sciencx - Saturday April 10, 2021, https://www.scien.cx/2021/04/10/make-your-own-youtube-adblocker-for-free/
HARVARD
CristoferK | Sciencx Saturday April 10, 2021 » Make your own YouTube AdBlocker for FREE!., viewed ,<https://www.scien.cx/2021/04/10/make-your-own-youtube-adblocker-for-free/>
VANCOUVER
CristoferK | Sciencx - » Make your own YouTube AdBlocker for FREE!. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/04/10/make-your-own-youtube-adblocker-for-free/
CHICAGO
" » Make your own YouTube AdBlocker for FREE!." CristoferK | Sciencx - Accessed . https://www.scien.cx/2021/04/10/make-your-own-youtube-adblocker-for-free/
IEEE
" » Make your own YouTube AdBlocker for FREE!." CristoferK | Sciencx [Online]. Available: https://www.scien.cx/2021/04/10/make-your-own-youtube-adblocker-for-free/. [Accessed: ]
rf:citation
» Make your own YouTube AdBlocker for FREE! | CristoferK | Sciencx | https://www.scien.cx/2021/04/10/make-your-own-youtube-adblocker-for-free/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.