@kytta Curious how DevTools detection works. (And consequently how it can be broken.)
Top-level
5 comments
@kytta Just had a look. Didn't expect it to be that simple. There are so many ways to mess with it. :) Some of which by use of DevTools, haha. @kytta Also, what if DevTools are opened in a separate window? Then the threshold-criteria in the conditional few lines afterwards will break. https://github.com/sindresorhus/devtools-detect/blob/main/index.js#L25-L26 Don't know what to make of this. :) |
@floppy Apparently it's this script: https://github.com/sindresorhus/devtools-detect
From README: โThis package has a lot of flaws. It used to work better, but browsers changed, and the detection now has too many false-positives.โ