Intercept Alerts and Enable Debugging

Ticket booking bot with timing and CSP bypass

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Intercept Alerts and Enable Debugging
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  Ticket booking bot with timing and CSP bypass
// @author       Scott
// @match        *://*/*
// @grant        GM_xmlhttpRequest
// @connect      localhost
// @license      MIT
// ==/UserScript==


(function() {
    'use strict';

    // 覆盖原生 alert 函数
    window.alert = function(message) {
        console.log("Intercepted alert: ", message);
        // 在控制台输出信息,而不弹出窗口
    };

    // 覆盖原生 confirm 函数
    window.confirm = function(message) {
        console.log("Intercepted confirm: ", message);
        return true; // 自动返回 true,模拟用户确认
    };

    // 覆盖原生 prompt 函数
    window.prompt = function(message, defaultResponse) {
        console.log("Intercepted prompt: ", message);
        return defaultResponse; // 自动返回默认响应
    };

    // 监控并显示 JavaScript 错误
    window.onerror = function(message, source, lineno, colno, error) {
        console.error("Error caught: ", message, " at ", lineno, ":", colno);
        // 可以在此处添加更多的处理逻辑
    };

    // 允许在调试时继续使用 F12
    document.addEventListener('keydown', function(event) {
        if (event.ctrlKey && event.key === 'u') {
            event.preventDefault(); // 防止 Ctrl + U 操作
        }
    });

})();