Using blockAdBlock.on strange behaviour
opened this issue · comments
Deleted user commented
i want to display a special div depending on whatever adBlock is detected or not (in both case, i must passthru a function in other to make other things like logs, etc ). But the problem is when i use blockAdBlock.on(true, {function1}); blockAdBlock.on(false, {function2}); {function1} is still executed. Is there a way to not execute my {function1} if blockAdBlock.on is FALSE ?
if(typeof blockAdBlock === 'undefined') {
testIfUserFromFrance(); /* display div1|div2, if from France or Not */
} else {
blockAdBlock.on(true , testIfUserFromFrance() ); /* display div1|div2, if from France or Not */
blockAdBlock.on(false, adBlockDefault); /* display the div3, if AdBlock is false (default beheavior) */
}