Disable Video Autoplay

Prevents videos from autoplaying on websites and adds a play button overlay

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

作者
Happyesss
日安装量
0
总安装量
26
评分
0 0 1
版本
1.0
创建于
2025-06-20
更新于
2025-06-20
大小
9.1 KB
许可证
暂无
适用于
所有网站

Disable Video Autoplay

Description:
Prevents videos from autoplaying on websites and adds a play button overlay. Works for most HTML5 videos and common video iframes (YouTube, Vimeo, etc).

Features:

  • Stops videos from autoplaying, even if triggered by JavaScript.
  • Disables autoplay in embedded YouTube/Vimeo iframes.
  • Adds a stylish play button overlay (can be turned off in the script).
  • Configurable allowlist/denylist for domains.
  • Lightweight and runs as soon as possible for best results.

Instructions:

  1. Install the script via your userscript manager (e.g., Tampermonkey, Violentmonkey, Greasemonkey).
  2. By default, the script blocks autoplay on all sites.
    • To allow autoplay on specific sites, add their domain to the allowlist in the script.
    • To only block autoplay on certain sites, add their domain to the denylist and leave the allowlist empty.
  3. To disable the play button overlay, set showPlayButton to false in the script’s config section.
  4. Enable debug logging by setting debug to true in the config.

How it works:

  • The script runs at document-start for maximum effectiveness.
  • It processes all existing and dynamically added videos/iframes.
  • For videos, it blocks autoplay and adds an overlay if enabled.
  • For iframes, it modifies the src to ensure autoplay=0 is set.

Compatibility:
Works on most modern websites and video platforms. Some sites with custom video players may not be fully supported.