// ==UserScript== // @name Bypass detectDevTools // @namespace http://tampermonkey.net/ // @version 1.0 // @description Prevents devtools detection // @author Some guy that hates devtools detection // @match *://*/* // @grant none // @run-at document-start // ==/UserScript== (function() { 'use strict'; // Prevent window.devtools detection Object.defineProperty(window, 'devtools', { get: function() { return { isOpen: false }; }, set: function(_) {} }); // Stop detection scripts that rely on debugger statement const oldDebugger = window.debugger; window.debugger = function() {}; // Patch console methods to prevent bait detection console.debug = console.log = console.info = console.warn = console.error = function() {}; // Block devtoolschange event window.addEventListener('devtoolschange', e => { e.stopImmediatePropagation(); }, true); // Patch Date to prevent timing-based detection const origDateNow = Date.now; Date.now = function() { return origDateNow() + Math.floor(Math.random() * 50); }; // Patch performance.now too if (window.performance && window.performance.now) { const origPerfNow = window.performance.now.bind(window.performance); window.performance.now = function() { return origPerfNow() + Math.random() * 10; }; } })();