// ==UserScript== // @name Bypass detectDevTools (v3.3) // @namespace http://tampermonkey.net/ // @version 3.3 // @description Neutralizes devtools detection & debugger traps (Chromium + Firefox) // @match *://*/* // @grant none // @inject-into page // @run-at document-start // ==/UserScript== (function bootstrap() { 'use strict'; // ------------------------------------------------------------------ // Resolve the REAL page window. // • Chromium, @grant none ? window IS the page realm // • Firefox / sandbox mode ? unsafeWindow (TM/VM) or // window.wrappedJSObject (Firefox Xray) is the real page global // ------------------------------------------------------------------ let pageWin = null; try { if (typeof unsafeWindow !== 'undefined' && unsafeWindow) pageWin = unsafeWindow; } catch (e) {} try { if (!pageWin && window.wrappedJSObject) pageWin = window.wrappedJSObject; } catch (e) {} if (!pageWin) pageWin = window; // Already in the page realm ? install directly (the Chromium fast path). if (pageWin === window) { install(window); return; } // Sandboxed ? inject the payload into the page realm as a real