Disable Video Autoplay

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
Happyesss
今日安裝
0
安裝總數
32
評價
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.