{"action":"created","comment":{"url":"https://api.github.com/repos/Valve/fingerprintjs2/pulls/comments/33897530","id":33897530,"diff_hunk":"@@ -591,6 +612,97 @@\n       document.body.appendChild(ads);\n       return document.getElementById(\"ads\") ? false : true;\n     },\n+    getHasLiedLanguages: function(){\n+      //We check if navigator.language is equal to the first language of navigator.languages\n+      if(typeof navigator.languages !== \"undefined\"){\n+        try{\n+          var firstLanguages = navigator.languages[0].substr(0, 2);\n+          if(firstLanguages !== navigator.language.substr(0, 2)){\n+            return true;\n+          }\n+        }catch(err){\n+          return true;\n+        }\n+      }\n+\n+      return false;\n+    },\n+    getHasLiedResolution: function(){\n+      if(screen.width < screen.availWidth){\n+        return true;\n+      }\n+      if(screen.height < screen.availHeight){\n+        return true;\n+      }\n+\n+      return false;\n+    },\n+    getHasLiedOs: function(){\n+      var userAgent = navigator.userAgent;\n+      var oscpu = navigator.oscpu;\n+      var platform = navigator.platform;\n+      var os;\n+      //We extract the OS from the user agent (respect theorder of the if else if statement)\n+      if(userAgent.toLowerCase().indexOf(\"windows phone\") >= 0){\n+        os = \"Windows Phone\";\n+      } else if(userAgent.toLowerCase().indexOf(\"win\") >= 0){\n+        os = \"Windows\";\n+      } else if(userAgent.toLowerCase().indexOf(\"android\") >= 0){\n+        os = \"Android\";\n+      } else if(userAgent.toLowerCase().indexOf(\"linux\") >= 0){\n+        os = \"Linux\";\n+      } else if(userAgent.toLowerCase().indexOf(\"iPhone\") >= 0 || userAgent.toLowerCase().indexOf(\"iPad\") >= 0 ){\n+        os = \"iOS\";\n+      } else if(userAgent.toLowerCase().indexOf(\"mac\") >= 0){\n+        os = \"Mac\";\n+      } else{\n+        os = \"Other\";\n+      }\n+      //We detect if the person uses a mobile device\n+      var mobileDevice;\n+      if ((\"ontouchstart\" in window) ||\n+           (navigator.maxTouchPoints > 0) ||\n+           (navigator.msMaxTouchPoints > 0)) {\n+            mobileDevice = true;\n+      } else{\n+        mobileDevice = false;\n+      }\n+\n+      if(mobileDevice && os !== \"Windows Phone\" && os !== \"Android\" && os !== \"iOS\" && os !== \"Other\"){\n+        return true;\n+      }\n+\n+      //We compare oscpu with the os extracted from the ua\n+      if(typeof oscpu !== \"undefined\"){\n+        if(oscpu.toLowerCase().indexOf(\"win\") >= 0 && os !== \"Windows\" && os !== \"Windows Phone\"){\n+          return true;\n+        }else if(oscpu.toLowerCase().indexOf(\"linux\") >= 0 && os !== \"Linux\" && os !== \"Android\"){","path":"fingerprint2.js","position":103,"original_position":103,"commit_id":"8bec61dfa051abb35d603338e6f67f87d6fe2d1d","original_commit_id":"8bec61dfa051abb35d603338e6f67f87d6fe2d1d","user":{"login":"Valve","id":27387,"avatar_url":"https://avatars.githubusercontent.com/u/27387?v=3","gravatar_id":"","url":"https://api.github.com/users/Valve","html_url":"https://github.com/Valve","followers_url":"https://api.github.com/users/Valve/followers","following_url":"https://api.github.com/users/Valve/following{/other_user}","gists_url":"https://api.github.com/users/Valve/gists{/gist_id}","starred_url":"https://api.github.com/users/Valve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Valve/subscriptions","organizations_url":"https://api.github.com/users/Valve/orgs","repos_url":"https://api.github.com/users/Valve/repos","events_url":"https://api.github.com/users/Valve/events{/privacy}","received_events_url":"https://api.github.com/users/Valve/received_events","type":"User","site_admin":false},"body":"please update spacing here too. Sorry for this, I will add an eslint rule to verify this automatically.","created_at":"2015-07-05T18:44:22Z","updated_at":"2015-07-05T18:44:22Z","html_url":"https://github.com/Valve/fingerprintjs2/pull/44#discussion_r33897530","pull_request_url":"https://api.github.com/repos/Valve/fingerprintjs2/pulls/44","_links":{"self":{"href":"https://api.github.com/repos/Valve/fingerprintjs2/pulls/comments/33897530"},"html":{"href":"https://github.com/Valve/fingerprintjs2/pull/44#discussion_r33897530"},"pull_request":{"href":"https://api.github.com/repos/Valve/fingerprintjs2/pulls/44"}}},"pull_request":{"url":"https://api.github.com/repos/Valve/fingerprintjs2/pulls/44","id":39221762,"html_url":"https://github.com/Valve/fingerprintjs2/pull/44","diff_url":"https://github.com/Valve/fingerprintjs2/pull/44.diff","patch_url":"https://github.com/Valve/fingerprintjs2/pull/44.patch","issue_url":"https://api.github.com/repos/Valve/fingerprintjs2/issues/44","number":44,"state":"open","locked":false,"title":"Detect liars","user":{"login":"antoinevastel","id":5827148,"avatar_url":"https://avatars.githubusercontent.com/u/5827148?v=3","gravatar_id":"","url":"https://api.github.com/users/antoinevastel","html_url":"https://github.com/antoinevastel","followers_url":"https://api.github.com/users/antoinevastel/followers","following_url":"https://api.github.com/users/antoinevastel/following{/other_user}","gists_url":"https://api.github.com/users/antoinevastel/gists{/gist_id}","starred_url":"https://api.github.com/users/antoinevastel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antoinevastel/subscriptions","organizations_url":"https://api.github.com/users/antoinevastel/orgs","repos_url":"https://api.github.com/users/antoinevastel/repos","events_url":"https://api.github.com/users/antoinevastel/events{/privacy}","received_events_url":"https://api.github.com/users/antoinevastel/received_events","type":"User","site_admin":false},"body":"I added new features to detect liars or people with inconsistencies in their fingerprint, particularly in their screen resolution, their languages or their OS. I followed the advices given in contributing.md.\r\n\r\nRegards,\r\n\r\nAntoine VASTEL","created_at":"2015-07-05T14:36:52Z","updated_at":"2015-07-05T18:44:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc79eab204714d608ca98bb726fa2c8e7538bb85","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Valve/fingerprintjs2/pulls/44/commits","review_comments_url":"https://api.github.com/repos/Valve/fingerprintjs2/pulls/44/comments","review_comment_url":"https://api.github.com/repos/Valve/fingerprintjs2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Valve/fingerprintjs2/issues/44/comments","statuses_url":"https://api.github.com/repos/Valve/fingerprintjs2/statuses/8bec61dfa051abb35d603338e6f67f87d6fe2d1d","head":{"label":"antoinevastel:master","ref":"master","sha":"8bec61dfa051abb35d603338e6f67f87d6fe2d1d","user":{"login":"antoinevastel","id":5827148,"avatar_url":"https://avatars.githubusercontent.com/u/5827148?v=3","gravatar_id":"","url":"https://api.github.com/users/antoinevastel","html_url":"https://github.com/antoinevastel","followers_url":"https://api.github.com/users/antoinevastel/followers","following_url":"https://api.github.com/users/antoinevastel/following{/other_user}","gists_url":"https://api.github.com/users/antoinevastel/gists{/gist_id}","starred_url":"https://api.github.com/users/antoinevastel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antoinevastel/subscriptions","organizations_url":"https://api.github.com/users/antoinevastel/orgs","repos_url":"https://api.github.com/users/antoinevastel/repos","events_url":"https://api.github.com/users/antoinevastel/events{/privacy}","received_events_url":"https://api.github.com/users/antoinevastel/received_events","type":"User","site_admin":false},"repo":{"id":38448961,"name":"fingerprintjs2","full_name":"antoinevastel/fingerprintjs2","owner":{"login":"antoinevastel","id":5827148,"avatar_url":"https://avatars.githubusercontent.com/u/5827148?v=3","gravatar_id":"","url":"https://api.github.com/users/antoinevastel","html_url":"https://github.com/antoinevastel","followers_url":"https://api.github.com/users/antoinevastel/followers","following_url":"https://api.github.com/users/antoinevastel/following{/other_user}","gists_url":"https://api.github.com/users/antoinevastel/gists{/gist_id}","starred_url":"https://api.github.com/users/antoinevastel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antoinevastel/subscriptions","organizations_url":"https://api.github.com/users/antoinevastel/orgs","repos_url":"https://api.github.com/users/antoinevastel/repos","events_url":"https://api.github.com/users/antoinevastel/events{/privacy}","received_events_url":"https://api.github.com/users/antoinevastel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/antoinevastel/fingerprintjs2","description":"Modern & flexible browser fingerprinting library, a successor to the original fingerprintjs","fork":true,"url":"https://api.github.com/repos/antoinevastel/fingerprintjs2","forks_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/forks","keys_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/teams","hooks_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/hooks","issue_events_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/issues/events{/number}","events_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/events","assignees_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/assignees{/user}","branches_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/branches{/branch}","tags_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/tags","blobs_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/git/refs{/sha}","trees_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/statuses/{sha}","languages_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/languages","stargazers_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/stargazers","contributors_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/contributors","subscribers_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/subscribers","subscription_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/subscription","commits_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/commits{/sha}","git_commits_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/git/commits{/sha}","comments_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/comments{/number}","issue_comment_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/issues/comments{/number}","contents_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/contents/{+path}","compare_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/merges","archive_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/downloads","issues_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/issues{/number}","pulls_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/pulls{/number}","milestones_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/milestones{/number}","notifications_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/labels{/name}","releases_url":"https://api.github.com/repos/antoinevastel/fingerprintjs2/releases{/id}","created_at":"2015-07-02T18:12:19Z","updated_at":"2015-07-02T18:12:19Z","pushed_at":"2015-07-05T18:23:54Z","git_url":"git://github.com/antoinevastel/fingerprintjs2.git","ssh_url":"git@github.com:antoinevastel/fingerprintjs2.git","clone_url":"https://github.com/antoinevastel/fingerprintjs2.git","svn_url":"https://github.com/antoinevastel/fingerprintjs2","homepage":"http://valve.github.io/fingerprintjs2/","size":173,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Valve:master","ref":"master","sha":"d0d90479502763bf5aa5b52263f929cc4aeed746","user":{"login":"Valve","id":27387,"avatar_url":"https://avatars.githubusercontent.com/u/27387?v=3","gravatar_id":"","url":"https://api.github.com/users/Valve","html_url":"https://github.com/Valve","followers_url":"https://api.github.com/users/Valve/followers","following_url":"https://api.github.com/users/Valve/following{/other_user}","gists_url":"https://api.github.com/users/Valve/gists{/gist_id}","starred_url":"https://api.github.com/users/Valve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Valve/subscriptions","organizations_url":"https://api.github.com/users/Valve/orgs","repos_url":"https://api.github.com/users/Valve/repos","events_url":"https://api.github.com/users/Valve/events{/privacy}","received_events_url":"https://api.github.com/users/Valve/received_events","type":"User","site_admin":false},"repo":{"id":30638861,"name":"fingerprintjs2","full_name":"Valve/fingerprintjs2","owner":{"login":"Valve","id":27387,"avatar_url":"https://avatars.githubusercontent.com/u/27387?v=3","gravatar_id":"","url":"https://api.github.com/users/Valve","html_url":"https://github.com/Valve","followers_url":"https://api.github.com/users/Valve/followers","following_url":"https://api.github.com/users/Valve/following{/other_user}","gists_url":"https://api.github.com/users/Valve/gists{/gist_id}","starred_url":"https://api.github.com/users/Valve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Valve/subscriptions","organizations_url":"https://api.github.com/users/Valve/orgs","repos_url":"https://api.github.com/users/Valve/repos","events_url":"https://api.github.com/users/Valve/events{/privacy}","received_events_url":"https://api.github.com/users/Valve/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Valve/fingerprintjs2","description":"Modern & flexible browser fingerprinting library, a successor to the original fingerprintjs","fork":false,"url":"https://api.github.com/repos/Valve/fingerprintjs2","forks_url":"https://api.github.com/repos/Valve/fingerprintjs2/forks","keys_url":"https://api.github.com/repos/Valve/fingerprintjs2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Valve/fingerprintjs2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Valve/fingerprintjs2/teams","hooks_url":"https://api.github.com/repos/Valve/fingerprintjs2/hooks","issue_events_url":"https://api.github.com/repos/Valve/fingerprintjs2/issues/events{/number}","events_url":"https://api.github.com/repos/Valve/fingerprintjs2/events","assignees_url":"https://api.github.com/repos/Valve/fingerprintjs2/assignees{/user}","branches_url":"https://api.github.com/repos/Valve/fingerprintjs2/branches{/branch}","tags_url":"https://api.github.com/repos/Valve/fingerprintjs2/tags","blobs_url":"https://api.github.com/repos/Valve/fingerprintjs2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Valve/fingerprintjs2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Valve/fingerprintjs2/git/refs{/sha}","trees_url":"https://api.github.com/repos/Valve/fingerprintjs2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Valve/fingerprintjs2/statuses/{sha}","languages_url":"https://api.github.com/repos/Valve/fingerprintjs2/languages","stargazers_url":"https://api.github.com/repos/Valve/fingerprintjs2/stargazers","contributors_url":"https://api.github.com/repos/Valve/fingerprintjs2/contributors","subscribers_url":"https://api.github.com/repos/Valve/fingerprintjs2/subscribers","subscription_url":"https://api.github.com/repos/Valve/fingerprintjs2/subscription","commits_url":"https://api.github.com/repos/Valve/fingerprintjs2/commits{/sha}","git_commits_url":"https://api.github.com/repos/Valve/fingerprintjs2/git/commits{/sha}","comments_url":"https://api.github.com/repos/Valve/fingerprintjs2/comments{/number}","issue_comment_url":"https://api.github.com/repos/Valve/fingerprintjs2/issues/comments{/number}","contents_url":"https://api.github.com/repos/Valve/fingerprintjs2/contents/{+path}","compare_url":"https://api.github.com/repos/Valve/fingerprintjs2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Valve/fingerprintjs2/merges","archive_url":"https://api.github.com/repos/Valve/fingerprintjs2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Valve/fingerprintjs2/downloads","issues_url":"https://api.github.com/repos/Valve/fingerprintjs2/issues{/number}","pulls_url":"https://api.github.com/repos/Valve/fingerprintjs2/pulls{/number}","milestones_url":"https://api.github.com/repos/Valve/fingerprintjs2/milestones{/number}","notifications_url":"https://api.github.com/repos/Valve/fingerprintjs2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Valve/fingerprintjs2/labels{/name}","releases_url":"https://api.github.com/repos/Valve/fingerprintjs2/releases{/id}","created_at":"2015-02-11T08:49:54Z","updated_at":"2015-07-03T21:08:07Z","pushed_at":"2015-07-05T18:23:55Z","git_url":"git://github.com/Valve/fingerprintjs2.git","ssh_url":"git@github.com:Valve/fingerprintjs2.git","clone_url":"https://github.com/Valve/fingerprintjs2.git","svn_url":"https://github.com/Valve/fingerprintjs2","homepage":"http://valve.github.io/fingerprintjs2/","size":432,"stargazers_count":319,"watchers_count":319,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":46,"mirror_url":null,"open_issues_count":13,"forks":46,"open_issues":13,"watchers":319,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Valve/fingerprintjs2/pulls/44"},"html":{"href":"https://github.com/Valve/fingerprintjs2/pull/44"},"issue":{"href":"https://api.github.com/repos/Valve/fingerprintjs2/issues/44"},"comments":{"href":"https://api.github.com/repos/Valve/fingerprintjs2/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/Valve/fingerprintjs2/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/Valve/fingerprintjs2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Valve/fingerprintjs2/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/Valve/fingerprintjs2/statuses/8bec61dfa051abb35d603338e6f67f87d6fe2d1d"}}}}