Well that is poopy. Is there a way I can “stealth” open dev tools on all sites? I like to see network requests in a lot of places, but don’t like to think the server will change their responses based on my local actions.
There are a couple of ways they can try to detect devtools being opened. As the sibling comment implies, the most popular way is to detect a sudden viewport resize, and you can avoid that by ensuring your devtools are set to open in a new window before opening them.
The only other ways I'm aware of are: - Detecting the keyboard shortcut, ⌘⌥i or equivalent, which you can avoid by using the browser menu, and - More riskily, evaluating a `debugger` statement and detecting whether evaluation paused. I'm not sure you could do anything about this one, but it would certainly be obvious to you whether it was happening.
I think both Facebook and Discord do that. I know that the Discord webapp has a big warning along the lines of "copy pasting code here can lead to a compromised account" and then a message about "if you know what you are doing, come work for us".
Comments (199) 50 threads
Earlier commentsThe only other ways I'm aware of are:
- Detecting the keyboard shortcut, ⌘⌥i or equivalent, which you can avoid by using the browser menu, and
- More riskily, evaluating a `debugger` statement and detecting whether evaluation paused. I'm not sure you could do anything about this one, but it would certainly be obvious to you whether it was happening.
Toggle the thing in the dotted rectangle: https://firefox-source-docs.mozilla.org/devtools-user/debugg...
EDIT:
BBC news puts a rather fancy one in the console
Facebook puts a warning about self xss in the console.
Welcome to the 90s.
All comments shown.
Couldn't load more comments. Check your connection and try again.