Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Valve/fingerprintjs2
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Vasilyev committed May 21, 2016
2 parents 1330a63 + 1208501 commit 1b485ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fingerprint2.js
Original file line number Diff line number Diff line change
Expand Up @@ -833,11 +833,12 @@
},
getAdBlock: function(){
var ads = document.createElement("div");
ads.setAttribute("id", "ads");
ads.innerHTML = ' ';
ads.className = 'adsbox';
try {
// body may not exist, that's why we need try/catch
document.body.appendChild(ads);
return document.getElementById("ads") ? false : true;
return document.getElementsByClassName('adsbox')[0].offsetHeight === 0;
} catch (e) {
return false;
}
Expand Down

0 comments on commit 1b485ce

Please sign in to comment.