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/

As of 2024-10-11. See the latest version.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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         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
        }
    });
})();