Detect use of browser DevTools #1184
mgorenstein
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Participants can use in-browser debugging functionality to view or modify task data. For instance, the 'correct response button' or 'correct answer' might be stored in a task trial object available on the client-side. Given recent worries about data quality on e.g. MTurk, detecting attempts to use browser debugging tools could provide experimenters with an additional indicator of suspicious activity.
I've done a bit of digging into existing detection methods, and it seems that, while no definitive cross-browser solution currently exists, a useful heuristic is to detect sudden changes in the difference between
window.outerWidth/Height
andwindow.innerWidth/Height
properties, which occur whenever an in-browser toolbar is opened. One major limitation of this approach is that DevTools consoles can be set to open in a separate window, which would not be detected.One popular implementation of that method is available in the devtools-detect repo. For those interested, I include a snippet below that adds a listener for the
devtoolschange
events indevtools-detect
and pushes them into jsPsych's InteractionData object.Beta Was this translation helpful? Give feedback.
All reactions