No Alert Plz

Prevent browser alert from popping up

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         No Alert Plz
// @namespace    http://tampermonkey.net/
// @version      1.0.1
// @description  Prevent browser alert from popping up
// @author       my
// @match        *://*/*
// @icon         data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSIjYzQxODE4IiBkPSJNMTIgMS42N2MuOTU1IDAgMS44NDUuNDY3IDIuMzkgMS4yNDdsLjEwNS4xNmw4LjExNCAxMy41NDhhMi45MTQgMi45MTQgMCAwIDEtMi4zMDcgNC4zNjNsLS4xOTUuMDA4SDMuODgyYTIuOTE0IDIuOTE0IDAgMCAxLTIuNTgyLTQuMmwuMDk5LS4xODVsOC4xMS0xMy41MzhBMi45MSAyLjkxIDAgMCAxIDEyIDEuNjdNMTIuMDEgMTVsLS4xMjcuMDA3YTEgMSAwIDAgMCAwIDEuOTg2TDEyIDE3bC4xMjctLjAwN2ExIDEgMCAwIDAgMC0xLjk4NnpNMTIgOGExIDEgMCAwIDAtLjk5My44ODNMMTEgOXY0bC4wMDcuMTE3YTEgMSAwIDAgMCAxLjk4NiAwTDEzIDEzVjlsLS4wMDctLjExN0ExIDEgMCAwIDAgMTIgOCIvPjwvc3ZnPg==
// @grant        none
// @run-at       document-body
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    console.log('🔔 No Alert Plz')

    window.alert = function(message) {
        console.warn('🚫 Alert 被阻止, Msg: ', message);
        return undefined;
    };
})();