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

If you open the console to check after you're finished, it says:

"What, are you going to check if the results are accurate? Go ahead "

But if you open it console while doing the test, it says:

"Hey, stop cheating! "




Why the hell can websites tell that I'm in the console? If I want to inspect some parts of a website (perhaps save an image), then I don't want that website to interfere.


They don’t. They just use “console.log”, you see it because you opened the console. It’s not like they know you’re there and then write a message.


Devtools can actually be detected to a certain extent - https://github.com/sindresorhus/devtools-detect


> Doesn't work if DevTools is undocked and will show false positive if you toggle any kind of sidebar.

This annoys me every time because I use Tree Style Tab, and a website tries to detect DevTools. See Samy Kamkar's website [0].

[0]: https://samy.pl/


Seems like this guy is just using a width a height difference to detect this. Also some ‘window.FireBug’ property, that doesn’t turn up much currently in chrome or ff console on Ubuntu


This entire project should be copied verbatim into browser bug trackers, imho.


While there are some ways to detect having devtools open[1], this website isn't actually using them. Instead, it just always writes these messages to the console. Before navigating to the answers, it clears the console so you don't see the messages that were logged before.

[1]: https://stackoverflow.com/a/7809413/451847


This answer how facebook does (did?) it and why is also very interesting: https://stackoverflow.com/a/21693931


Not used in this case but if you open the console docked (which is the default as opposed to a separate window) then the resolution of the window will change.


Noscript page also includes:

<script>var answers="I SAID STOP CHEATING! >:( You will get answers and explanations at the end, you dang dastardly dangusson."</script>

I love sites that have easter-eggs in noscript/console. Noscript I can see being annoying (i.e. instead of showing content), but there are some exceptions like this site.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: