Created
September 19, 2025 21:13
-
-
Save PatoFlamejanteTV/a4113a5a8eb0d262a6adc70f73555698 to your computer and use it in GitHub Desktop.
Disable Anti-DevTool Neutralizer / Anti-devtools blocker / Anti-Devtools remover / Bypasser / Works for Chrome, Firefox, etc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Disable Anti-DevTool Neutralizer | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.0 | |
| // @description Disables anti-devtool scripts using multiple techniques for debugging and development purposes. | |
| // @author UltimateQuack (aak. PatoFlamejanteTV) | |
| // @match *://*/* | |
| // @grant none | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| // 1. Remove key event listeners (most anti-devtool scripts use these) | |
| window.onkeydown = null; | |
| window.onkeyup = null; | |
| window.onkeypress = null; | |
| document.onkeydown = null; | |
| document.onkeyup = null; | |
| document.onkeypress = null; | |
| // 2. Remove context menu blocking | |
| window.oncontextmenu = null; | |
| document.oncontextmenu = null; | |
| // 3. Remove all inline event listeners on body and document | |
| if (document.body) { | |
| document.body.onkeydown = null; | |
| document.body.onkeyup = null; | |
| document.body.onkeypress = null; | |
| document.body.oncontextmenu = null; | |
| } | |
| // 4. Remove all event listeners by cloning body (advanced) | |
| if (document.body) { | |
| var oldBody = document.body; | |
| var newBody = oldBody.cloneNode(true); | |
| oldBody.parentNode.replaceChild(newBody, oldBody); | |
| } | |
| // 5. Remove scripts by src attribute | |
| document.querySelectorAll('script[src*="disable-devtool"]').forEach(e => e.remove()); | |
| // 6. Remove inline scripts that reference "devtool" or suspicious keywords | |
| document.querySelectorAll('script').forEach(script => { | |
| if (script.innerText.match(/devtool|ondevopen|debugger|console\.profile/gi)) { | |
| script.remove(); | |
| } | |
| }); | |
| // 7. Overwrite global functions (if present) | |
| if (typeof window.disableDevtool === "function") { | |
| window.disableDevtool = function() {}; | |
| } | |
| // 8. Overwrite detection callbacks | |
| if (typeof window.ondevtoolopen === "function") { | |
| window.ondevtoolopen = function() {}; | |
| } | |
| // 9. Overwrite console methods (some scripts use these for detection) | |
| ['profile', 'profileEnd', 'clear', 'log', 'warn', 'info', 'error'].forEach(fn => { | |
| if (typeof console[fn] === "function") { | |
| console[fn] = function() {}; | |
| } | |
| }); | |
| // 10. Patch setInterval and setTimeout to block repeated checks | |
| const origSetInterval = window.setInterval; | |
| window.setInterval = function(fn, delay, ...args) { | |
| if (typeof fn === 'function' && fn.toString().match(/devtool|debugger|console\.profile/gi)) { | |
| return null; | |
| } | |
| return origSetInterval(fn, delay, ...args); | |
| }; | |
| const origSetTimeout = window.setTimeout; | |
| window.setTimeout = function(fn, delay, ...args) { | |
| if (typeof fn === 'function' && fn.toString().match(/devtool|debugger|console\.profile/gi)) { | |
| return null; | |
| } | |
| return origSetTimeout(fn, delay, ...args); | |
| }; | |
| // 11. Block 'beforeunload' and 'unload' events (sometimes used to reload/redirect) | |
| window.onbeforeunload = null; | |
| window.onunload = null; | |
| window.addEventListener('beforeunload', function(e) { | |
| e.stopImmediatePropagation(); | |
| }, true); | |
| window.addEventListener('unload', function(e) { | |
| e.stopImmediatePropagation(); | |
| }, true); | |
| // 12. Remove suspicious document event listeners (keydown, contextmenu, etc.) | |
| const removeAllListeners = (event) => { | |
| const clone = document.body.cloneNode(true); | |
| document.body.parentNode.replaceChild(clone, document.body); | |
| }; | |
| ['keydown', 'keyup', 'keypress', 'contextmenu'].forEach(event => { | |
| window.addEventListener(event, function(e) { | |
| e.stopImmediatePropagation(); | |
| }, true); | |
| document.addEventListener(event, function(e) { | |
| e.stopImmediatePropagation(); | |
| }, true); | |
| }); | |
| // 13. Periodically re-apply in case anti-devtool is injected dynamically | |
| setInterval(() => { | |
| window.onkeydown = null; | |
| window.onkeyup = null; | |
| window.onkeypress = null; | |
| document.onkeydown = null; | |
| document.onkeyup = null; | |
| document.onkeypress = null; | |
| window.oncontextmenu = null; | |
| document.oncontextmenu = null; | |
| if (document.body) { | |
| document.body.onkeydown = null; | |
| document.body.onkeyup = null; | |
| document.body.onkeypress = null; | |
| document.body.oncontextmenu = null; | |
| } | |
| }, 1000); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment