Disable JavaScript Alert Boxes

Blocks annoying page-load alert boxes during the first 5 seconds

2026-05-08 기준 버전입니다. 최신 버전을 확인하세요.

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         Disable JavaScript Alert Boxes
// @namespace    RGlzYWJsZSBqYXZhc2NyaXB0IGFsZXJ0IGJveGVz
// @version      1.1
// @description  Blocks annoying page-load alert boxes during the first 5 seconds
// @author       smed79
// @license      GPLv3
// @icon         https://i25.servimg.com/u/f25/11/94/21/24/x10.jpg
// @include      *://*/*
// @run-at       document-start
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Inject directly into the Main World so we actually intercept the page's alerts
    const payload = `(function() {
        try {
            // Keep a private, hidden reference to the original alert
            const originalAlert = window.alert;

            // Override the page's alert function to do absolutely nothing
            window.alert = function() {};

            // Restore the original alert after 5 seconds
            setTimeout(() => {
                window.alert = originalAlert;
            }, 5000);
        } catch (e) {}
    })();`;

    // Create the script tag
    const script = document.createElement('script');
    script.textContent = payload;

    // Inject instantly at document-start before the website's spam scripts run
    if (document.documentElement) {
        document.documentElement.appendChild(script);
        script.remove(); // Clean up the tag so the website doesn't know we are there
    }
})();