diff --git a/bower.json b/bower.json index f3539a0..f6a7027 100644 --- a/bower.json +++ b/bower.json @@ -2,7 +2,7 @@ "name": "FuckAdBlock", "author": ["Valentin Allaire ", "Stephan Hesse "], - "version": "2.2.0", + "version": "2.2.1", "main": "fuckadblock.js", "licenses": [], "ignore": [ diff --git a/fuckadblock.js b/fuckadblock.js index a5e327a..8b05fd3 100644 --- a/fuckadblock.js +++ b/fuckadblock.js @@ -1,5 +1,5 @@ /* -FuckAdBlock 2.2 +FuckAdBlock 2.2.1 http://github.com/sitexw/FuckAdBlock */ @@ -7,6 +7,7 @@ function FuckAdBlock() { this.interval = 50; this.max = 200; this.end_reset = true; + this.check_onready = true; var start = false; var func_true = []; var func_false = []; @@ -78,5 +79,12 @@ function FuckAdBlock() { } var that = this; + window.addEventListener('load', function() { + setTimeout(function() { + if(that.check_onready === true) { + fuckAdBlock.check(); + } + }, 1); + }, false); } var fuckAdBlock = new FuckAdBlock(); diff --git a/package.json b/package.json index 583f00c..f7e6b4a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "FuckAdBlock", - "version": "2.2.0", + "version": "2.2.1", "description": "Detects ad blockers", "main": "fuckadblock.js", "scripts": { diff --git a/test.html b/test.html index 6260609..47567a8 100644 --- a/test.html +++ b/test.html @@ -2,7 +2,7 @@ - FuckAdBlock 2.2 Exemple + FuckAdBlock 2.2.1 Exemple