We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
in Chrome, possible to detect when devtools is open by using the Runtime.enable event. for information, please read this article: How New Headless Chrome & the CDP Signal Are Impacting Bot Detection.
Runtime.enable
Here is a simple example that can detect if devtools is open (only chrome):
if (window.chrome) { let r = Math.random() * 1000 | 0; let r2 = Math.random() * 1000 | 0; let _r = r; try { let err = new Error(); Object.defineProperty(err, "stack", { configurable: false, enumerable: false, get: function () { _r += r2; return ""; } }); // Dont remove this line console.debug(err); err.stack; if (r + r2 !== _r) { // Implement countermeasures here console.log("DevTools detected!"); } } catch (e) { } }
Test on chrome 127:
The text was updated successfully, but these errors were encountered:
There is a lot other methods to check for devtool: https://github.com/AEPKILL/devtools-detector
Sorry, something went wrong.
Great find, this can be added
you could add to run your custom script or function or to do a custom action
No branches or pull requests
in Chrome, possible to detect when devtools is open by using the
Runtime.enable
event. for information, please read this article: How New Headless Chrome & the CDP Signal Are Impacting Bot Detection.Here is a simple example that can detect if devtools is open (only chrome):
Test on chrome 127:
Desktop.2024.08.21.-.11.43.28.03.mp4
The text was updated successfully, but these errors were encountered: