Code Monkey home page Code Monkey logo

youtube-ad-blocker's Introduction

简介

这是一个去除YouTube广告的GreasyFork脚本,轻量且高效,它能丝滑的去除界面广告和视频广告。android电脑双端适用,android端请使用Via浏览器安装使用。PC请使用Tampermonkey安装使用,代码已同步至GitHub。iOS请自行尝试。

原理

  • 使用style标签设置去除广告样式。
  • 使用MutationObserver监听视频广告并将其去除。

效果

  • 完全去除界面广告,且后续使用感知不到界面广告的存在。
  • 对于拥有跳过按钮的视频广告,可以在毫秒单位内跳过。
  • 对于没有跳过按钮的6s视频广告,可以在毫秒单位内跳过。

Introduction

This is a GreasyFork script that removes YouTube ads. It works on both android and PC. For android devices, please install and use it with the Via Browser. For PC, please install and use it with Tampermonkey. The code has also been synchronized to GitHub. iOS can also be used, maybe.

Principles

  • Use style tags to set the ad removal styles.
  • Use MutationObserver to listen for video ads and remove them.

Effects

  • Interface ads are completely removed, and subsequent use cannot perceive the presence of interface ads.
  • For video ads with a skip button, they can be skipped within milliseconds.
  • The 6s video advertisement without a skip button can be skipped in milliseconds.

youtube-ad-blocker's People

Contributors

iamfugui avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.