AEPKILL / devtools-detector

Detect if DevTools is open
https://blog.aepkill.com/demos/devtools-detector/
MIT License
1.11k stars 104 forks source link

date-to-string and function-to-string checkers #45

Closed EladGB closed 2 years ago

EladGB commented 2 years ago

Hi, Could you please explain how the date-to-string and function-to-string checkers work? I mean, from the code it seems that when the Devtools is open the "log" should call them twice (because the code checks "==2"). But I tried with console open and it is called only once, so the counter is 1 and never gets to 2.

BTW- I apologize if this is not the right place to leave this question but I couldn't find any thread for posting questions :))

AEPKILL commented 2 years ago

This is because in the old chrome kernel it will be executed twice