Created
November 1, 2016 11:17
-
-
Save klebinhopk/54a8c9321882fd4d3c4c39ce54858c82 to your computer and use it in GitHub Desktop.
Adblock - Detect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Auto Detect</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" /> | |
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" /> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-xs-12 col-sm-12"> | |
<div class="main-content"> | |
<div class="clearfix"></div> | |
<div class="col-sm-6"> | |
<p class="pull-right"> | |
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> | |
<!-- top_content1 --> | |
<ins class="adsbygoogle" | |
style="display:inline-block;width:300px;height:250px" | |
data-ad-client="ca-pub-4997600402648823" | |
data-ad-slot="2022189393"></ins> | |
<script> | |
(adsbygoogle = window.adsbygoogle || []).push({}); | |
</script> | |
</p> | |
</div> | |
<div class="col-sm-6"> | |
<p class="pull-left"> | |
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> | |
<!-- top_content1 --> | |
<ins class="adsbygoogle" | |
style="display:inline-block;width:300px;height:250px" | |
data-ad-client="ca-pub-4997600402648823" | |
data-ad-slot="2022189393"></ins> | |
<script> | |
(adsbygoogle = window.adsbygoogle || []).push({}); | |
</script> | |
</p> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="modal fade" id="adBlockerPopup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
<div class="modal-dialog" role="document"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<!--<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>--> | |
<h4 class="modal-title text-center" id="myModalLabel">AD BLOCKER DETECTED</h4> | |
</div> | |
<div class="modal-body"> | |
<div> | |
<p class="text-center"> | |
<img src="https://1.bp.blogspot.com/-SsYfwjp2WjE/WBg1PZFwywI/AAAAAAAAHWA/MElz2W1KVT8Hdi7xRAc_Pi9VWRiUs6CsQCLcB/s1600/adblock.png" alt="AD BLOCKER DETECTED"> | |
</p> | |
<p class="text-center"> | |
Percebemos que você está com o adblock ativado para restringir os anúncios veiculados no site. | |
</p> | |
<p class="text-center"> | |
Desative os o adblock, para continuar visualizando o site. | |
</p> | |
</div> | |
</div> | |
<div class="modal-footer"> | |
<button type="button" class="btn btn-primary" id="adBlockerPopupRefresh"> | |
<i class="fa fa-refresh" aria-hidden="true"></i> | |
Atualizar | |
</button> | |
</div> | |
</div> | |
</div> | |
</div> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | |
<script> | |
/* Adblock */ | |
$(document).ready(function(){ | |
(function(){ | |
var adBlockFlag = document.createElement('div'); | |
adBlockFlag.innerHTML = ' '; | |
adBlockFlag.className = 'adsbox'; | |
$('body').append(adBlockFlag); | |
window.setTimeout(function() { | |
if (adBlockFlag.offsetHeight === 0) { | |
showAdBlockPopUp(); | |
$('body').addClass('adblock'); | |
} | |
//adBlockFlag.remove(); | |
}, 100); | |
function showAdBlockPopUp(){ | |
var adBlockerPopup = $('#adBlockerPopup'); | |
adBlockerPopup.modal({ | |
backdrop: 'static', | |
keyboard: false | |
}); | |
adBlockerPopup.modal('show'); | |
} | |
$(document).on('click', '#adBlockerPopupRefresh', function(){ | |
location.reload(); | |
}); | |
})(); | |
}); | |
/* Adblock */ | |
</script> | |
<style type="text/css"> | |
@import "https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700"; | |
body { | |
font-family: "Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif; | |
margin: 0; | |
padding: 0; | |
min-height: 100vh; | |
position: relative; | |
font-size: 14px; | |
} | |
.main-title{ | |
text-decoration: underline; | |
font-size: 35px; | |
} | |
.btn-demo-success:hover { | |
background-color: #51ba00 !important; | |
box-shadow: 0 3px 0 #4db300, 0 5px 2px rgba(0, 0, 0, 0.2) !important; | |
color: #ffffff; | |
text-decoration: none; | |
} | |
.btn-success, .panel-success { | |
background-color: #27c24c !important; | |
border-color: #27c24c !important; | |
color: #fff !important; | |
} | |
.btn-primary, .panel-primary { | |
background-color: #7266ba; | |
border-color: #7266ba; | |
color: #fff !important; | |
} | |
.btn-info, .panel-info { | |
background-color: #23b7e5; | |
border-color: #23b7e5; | |
color: #fff !important; | |
} | |
.btn-warning, .panel-warning { | |
background-color: #fad733; | |
border-color: #fad733; | |
color: #fff !important; | |
} | |
.btn-danger, .panel-danger { | |
background-color: #f05050; | |
border-color: #f05050; | |
color: #fff !important; | |
} | |
.btn-dark, .panel-dark { | |
background-color: #3a3f51; | |
border-color: #3a3f51; | |
color: #fff !important; | |
} | |
#adBlockerPopup .modal-header{background: #e74c3c;color: #fff;} | |
#adBlockerPopup .modal-header h4{color: #fff;} | |
#adBlockerPopup .modal-footer{text-align: center;} | |
#adBlockerPopup .modal-footer i{color:#fff;padding-right: 5px;} | |
#adBlockerPopup .modal-footer .btn{border-radius:0px;width: 200px;height: 40px;font-size: 17px;} | |
</style> | |
</body> | |
</html> | |
\ No newline at end of file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment