Hacker News new | past | comments | ask | show | jobs | submit login

This SO post is a bit old now, so I'd verify before proceeding, but it looks like having devtools open in a separate window will enable you to circumvent the check.

https://stackoverflow.com/questions/40153206/detect-if-conso...




Or have it open before you visit the page. Assuming they are detecting a resize.

But if they really detect a resize, anyone who actually does resize their page will be blocked as well.

Doing that seems a bit insane to me.


it's been some years, but I think it's still possible to detect the viewport resize without a corresponding window resize, so the 'docked' DevTools can be inferred distinct from a resizing of the window.


enable/disable a menu or toolbar then. Not sure what full screen would do either


That is exactly what ends up happening when you detect a viewport resize without a window resize and immediately assume it's the devtools. A user opens their bookmark sidebar and gets blacklisted, because the code simply assumes what's happened.


Almost everyone resizes windows by manually dragging the corner. This will generate a series of resize events rather than a single jump. This is a real technique, but it tends to be used by shady piracy sites that want to stop piracy of their pirated contents.

There's another cute approach based on the fact console.log(foo) calls foo.toString if and only if the devtools is open.


I could open the history or bookmarks panel in Firefox and get an instant resize. Or click <Super>+<Left> to snap the browser to the side of my screen.

It seems that this would create far too many false positives.


That's why this is used by a particular subset of websites only. They pirate tv shows and movies, and then pack the screen with ads. They don't care at all about user inconvenience or loyalty. The answer to "your website breaks when I do x" would be "stop doing x", if they even had a customer support team. Some of them disable every browser other than chrome on the grounds that users of "weird" browsers are more likely to be "hackers".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: