Hacker News new | ask | show | jobs
by sphars 1184 days ago
One of the ways this is detected is by window resizing. You can see an example npm package that can detect devtools here: https://github.com/sindresorhus/devtools-detect
1 comments

Like they say there, there are other reasons that the window might be resized, including other sidebars, or split screen (if you use a browser that has this feature), or possibly even printing the document (since the page will have different dimensions than the screen), or resizing the window if you have other programs open at the same time, etc.

I had wanted to prevent web pages from detecting the window height, which has many benefits, including this but also prevents using the window height to override font sizes, preventing auto-loading on scrolling, and auto-scrolling ads into view, in addition to the debugger.

Additionally, detecting the outer window size should not be possible at all; it is not useful. Only the document view area is useful to detect anyways.