Typically it seems to poll window height/width vars in js.
https://github.com/sindresorhus/devtools-detect
Another variant: https://stackoverflow.com/questions/7798748/find-out-whether...
Another variant: https://stackoverflow.com/questions/7798748/find-out-whether...