Bypass DevTools Detection, Unlock Functionality, and Auto Check-in

Bỏ qua phát hiện DevTools, mở khóa các chức năng và tự động điểm danh trên https://loulxgame.com/

Versión del día 11/10/2024. Echa un vistazo a la versión más reciente.

Tendrás que instalar una extensión para tu navegador como Tampermonkey, Greasemonkey o Violentmonkey si quieres utilizar este script.

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

Necesitarás instalar una extensión como Tampermonkey o Violentmonkey para instalar este script.

Necesitarás instalar una extensión como Tampermonkey o Userscripts para instalar este script.

Necesitará instalar una extensión como Tampermonkey para instalar este script.

Necesitarás instalar una extensión para administrar scripts de usuario si quieres instalar este script.

(Ya tengo un administrador de scripts de usuario, déjame instalarlo)

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

(Ya tengo un administrador de estilos de usuario, déjame instalarlo)

// ==UserScript==
// @name         Bypass DevTools Detection, Unlock Functionality, and Auto Check-in
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Bỏ qua phát hiện DevTools, mở khóa các chức năng và tự động điểm danh trên https://loulxgame.com/
// @author       hieuck
// @match        https://loulxgame.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Mở khóa chuột phải
    document.addEventListener('contextmenu', function(event) {
        event.stopPropagation(); // Ngăn chặn hành động mặc định
    }, true);

    // Mở khóa phím tắt
    document.addEventListener('keydown', function(event) {
        const allowedKeys = [123, 73, 74, 67, 85, 83, 80, 65, 67, 86]; // F12, Ctrl+Shift+I, Ctrl+Shift+J, ...
        if (allowedKeys.includes(event.keyCode)) {
            event.stopPropagation(); // Ngăn chặn hành động mặc định
        }
    }, true);

    // Ghi đè hàm debugger
    window.debugger = function() {
        // Không làm gì khi gọi debugger
    };

    // Ngăn chặn phát hiện DevTools
    (function() {
        let callbacks = [];
        let timeLimit = 50;
        let open = false;

        function loop() {
            const startTime = new Date();
            // Ghi đè hàm debugger
            if (window._debugger === undefined) {
                window._debugger = function() {};
            }

            window._debugger(); // Gọi hàm giả mạo

            if (new Date() - startTime > timeLimit) {
                if (!open) {
                    callbacks.forEach(function(fn) {
                        fn.call(null);
                    });
                }
                open = true;
                console.log('Phát hiện DevTools, nhưng đã được xử lý.');
                // Ngăn chặn việc xóa nội dung
                // document.body.innerHTML = ""; // Không xóa nội dung trang
                // window.stop(); // Không dừng trang
            } else {
                open = false;
            }
        }

        setInterval(loop, 100); // Kiểm tra mỗi 100ms

        // Phương thức thêm listener
        window.addListener = function(fn) {
            callbacks.push(fn);
        };

        // Phương thức xóa listener
        window.cancelListener = function(fn) {
            callbacks = callbacks.filter(function(v) {
                return v !== fn;
            });
        };

    })();

    // Hàm tự động điểm danh
    function autoCheckIn() {
        const checkInButton = document.querySelector('.checkin-details-link');

        // Nếu nút có chứa "Đã điểm danh"
        if (checkInButton && checkInButton.innerHTML.includes("Đã điểm danh")) {
            console.log('Đã điểm danh hôm nay. Dừng lại.');
            return; // Dừng lại nếu đã điểm danh
        }

        // Tìm nút điểm danh
        if (checkInButton) {
            // Tạo sự kiện click cho nút điểm danh
            checkInButton.click();
            console.log('Đã điểm danh tự động!');
        } else {
            console.log('Nút điểm danh không tìm thấy.');
        }
    }

    // Chờ trang tải xong trước khi điểm danh
    window.addEventListener('load', function() {
        if (window.location.href === 'https://loulxgame.com/') {
            setTimeout(autoCheckIn, 1000); // Tự động điểm danh sau 1 giây
        }
    });
})();