Re:uBlock Origin Maintainer on Chrome vs. Firefox WebExtensions
by bsimpson on Wednesday August 09, 2017 @10:09PM
(#14975730)
This is what happens when I trigged DevTools while logging key events:
document.addEventListener('keydown', ({ keyCode }) => console.log(keyCode))
91
16
73
You can see each key.
Re:uBlock Origin Maintainer on Chrome vs. Firefox WebExtensions
by efreak on Thursday August 10, 2017 @05:17AM
(#14977905)
But there's different ways of opening dev tools. You can use the mouse to right click as well.
In fact, when using keyboard shortcuts in the better these days, I have a habit of hitting alt+D first to get to the address bar first (Outlook likes to hijack browser shortcuts like Ctrl+n), in which case the website shouldn't know I'm pressing anything at all.
Re:uBlock Origin Maintainer on Chrome vs. Firefox WebExtensions
by bsimpson on Thursday August 10, 2017 @01:34PM
(#14982065)
I think OP's point is you can listen for a bunch of signals: If you see the right keydown events, or if you see a contextmenu followed by a rapid change to innerWidth, they probably opened dev tools, and you should delete your evil cookies.
The person who figured this out probably opened them via menu and had dev tools in another window, so the evil folks couldn't detect the resize.
The easy check for this would be to see whether opening the devtools in detached mode via the menus makes it notice.
Note that this would actually be quite a pain to hide from the page, just because it's something the page needs to know to display some stuff and make rendering calculations. If it was hidden from the page, we'd suddenly be complaining about debugging floating footers which are hiding under the devtools.