Bypass Confirmations

Bypass all confirmation dialogs

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

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

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

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

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

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

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

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

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

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

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

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

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

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

作者
Sue Smith MD
日安装量
1
总安装量
3
评分
0 0 0
版本
1.0.0
创建于
2025-12-25
更新于
2025-12-25
大小
4.3 KB
许可证
AGPL-3.0
适用于
所有网站

Remove All Confirmations

Bypass all confirmation dialogs on web pages.

What It Does

Removes these annoying confirmations:

  • window.confirm() dialogs
  • "Leave site?" warnings (beforeunload)
  • Rails-style confirmation attributes (data-confirm, etc.)
  • Inline onclick="confirm(...)" handlers
  • Form submit confirmations

How It Works

  1. Overrides browser APIs - Makes window.confirm() always return true
  2. Blocks beforeunload events - Prevents "leave page" warnings
  3. Cleans DOM - Removes confirmation attributes from elements
  4. Monitors changes - Watches for new confirmations being added

Installation

  1. Install a userscript manager (Violentmonkey, Tampermonkey, etc.)
  2. Click the script file to install
  3. Done - runs automatically on all sites

Performance

  • Skips iframes (each gets its own instance)
  • Debounced DOM monitoring (50ms delay)

Technical Details

API Overrides:

  • window.confirm → always true
  • BeforeUnloadEvent.returnValue → read-only, always empty
  • window.onbeforeunload → read-only, always null
  • EventTarget.addEventListener → ignores beforeunload listeners

DOM Cleanup:

  • Removes data-confirm, data-action-confirm, etc.
  • Removes inline handlers containing confirm()
  • Removes form handlers containing confirm()

Monitoring:

  • MutationObserver watches for new elements and attribute changes
  • Automatically cleans confirmations as they're added