Skip to content

Commit

Permalink
Merge pull request #6 from sitexw/v3.x
Browse files Browse the repository at this point in the history
Added support for IE8 and new version (3.0.1 => 3.0.2)
  • Loading branch information
sitexw committed Nov 13, 2014
2 parents 5663e03 + 8d23aeb commit 43fdb97
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FuckAdBlock (v3.0.1)
FuckAdBlock (v3.0.2)
===========

Allows you to detect those nasty ad blockers.
Expand All @@ -9,7 +9,7 @@ Valid on :
---------------------
- Google Chrome
- Mozilla Firefox
- Internet Explorer
- Internet Explorer (8+)
- Safari
- Opera

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "FuckAdBlock",
"author": ["Valentin Allaire <[email protected]>"],
"version": "3.0.1",
"version": "3.0.2",
"main": "fuckadblock.js",
"licenses": [],
"ignore": [
Expand Down
13 changes: 9 additions & 4 deletions fuckadblock.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
FuckAdBlock 3.0.1
FuckAdBlock 3.0.2
http://github.com/sitexw/FuckAdBlock
*/

Expand All @@ -14,7 +14,7 @@ http://github.com/sitexw/FuckAdBlock
}

var self = this;
window.addEventListener('load', function() {
var eventCallback = function() {
setTimeout(function() {
if(self._options.checkOnLoad === true) {
if(self._var.bait === null) {
Expand All @@ -25,15 +25,20 @@ http://github.com/sitexw/FuckAdBlock
}, 1);
}
}, 1);
}, false);
};
if(window.addEventListener) {
window.addEventListener('load', eventCallback, false);
} else {
window.attachEvent('onload', eventCallback);
}
};
FuckAdBlock.prototype._options = {
checkOnLoad: true,
resetOnEnd: true,
loopCheckTime: 50,
loopMaxNumber: 5,
baitClass: 'pub_300x250 pub_300x250m pub_728x90 text-ad textAd text_ad text_ads text-ads text-ad-links',
baitStyle: 'width: 1px !important; height: 1px !important; position: absolute !important; left: -10000px !important; top: -1000px !important;',
baitStyle: 'width: 1px !important; height: 1px !important; position: absolute !important; left: -10000px !important; top: -1000px !important;'
};
FuckAdBlock.prototype._var = {
version: '3.0.1',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "FuckAdBlock",
"version": "3.0.1",
"version": "3.0.2",
"description": "Detects ad blockers",
"main": "fuckadblock.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions test.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!doctype html>
<html>
<head>
<title>FuckAdBlock 3.0.1</title>
<title>FuckAdBlock 3.0.2</title>

<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<style>
Expand Down Expand Up @@ -32,7 +32,7 @@
<div class="container">
<header class="row">
<div class="col-sm-8">
<h1>FuckAdBlock <small>3.0.1</small></h1>
<h1>FuckAdBlock <small>3.0.2</small></h1>
</div>
<div class="col-sm-4 text-right">
<h4>
Expand Down

0 comments on commit 43fdb97

Please sign in to comment.