Skip to content

Commit

Permalink
better headless check
Browse files Browse the repository at this point in the history
  • Loading branch information
NullDev committed Nov 14, 2023
1 parent 9514b85 commit 6c0cef4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web/src/challange/fingerprinting.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ class Fingerprinting {
*/
isNotHeadless(){
const isHeadless = !!navigator.webdriver // @ts-ignore
|| !!window.chrome
|| !!navigator.languages
|| !!window.chrome // @ts-ignore
|| !!navigator.callPhantom || !!navigator.__phantom
|| !window.screenX || !window.screenY || !window.outerHeight || !window.outerWidth
|| navigator.userAgent.toLowerCase().includes("headless");
return !isHeadless;
}
Expand Down

0 comments on commit 6c0cef4

Please sign in to comment.