Greasy Fork

Greasy Fork is available in English.

YouTube去广告

这是一个去除YouTube广告的脚本,轻量且高效,它能丝滑的去除界面广告和视频广告,包括6s广告。

当前为 2023-05-04 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
iamfugui
评分
0 0 0
版本
5.0
创建于
2023-02-06
更新于
2023-05-04
大小
8.1 KB
许可证
MIT
适用于

简介

这是一个去除YouTube广告的脚本,轻量且高效,它能丝滑的去除界面广告和视频广告。请使用Greasy Fork安装使用,代码已同步至GitHub

原理

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

效果

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

Introduction

This is a script that removes ads on YouTube, it's lightweight and efficient, capable of smoothly removing interface and video ads.Please install and use this script via Greasy Fork, and the source code has been synchronized to GitHub.

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.