logo logo

The next-generation blog, news, and magazine theme for you to start sharing your stories today!

The Blogzine

Save on Premium Membership

Get the insights report trusted by experts around the globe. Become a Member Today!

View pricing plans

New York, USA (HQ)

750 Sing Sing Rd, Horseheads, NY, 14845

Call: 469-537-2410 (Toll-free)

hello@blogzine.com
Blogger

Code Thông Báo Tắt AdBlocker

Hôm nay mình vừa vào một trang blog của 1 blogger indonexia và nhận thấy trang blog này cũng khá hay và có 1 tiện ích cũng rất ok đó là "Thông Báo Tắt AdBlocker Khi xem Blog Của Anh Này". N…

avatar
Hung.Pro.VN

Developer Windows


  • 28/03/2017
  • Views

Hôm nay mình vừa vào một trang blog của 1 blogger indonexia và nhận thấy trang blog này cũng khá hay và có 1 tiện ích cũng rất ok đó là "Thông Báo Tắt AdBlocker Khi xem Blog Của Anh Này". Nên mình đã chôm chia khi view source và nhận thấy cũng khá hay nên hôm nay mình viết bài chia sẽ cho mọi người luôn :D

Đoạn code CSS. Các bạn bỏ đoạn code CSS bên dười vào trong đoạn code sau "<b:skin><![CDATA[/*"
/* Notifikasi Adblocker Adsense */
#keep-ads{padding:0;position:fixed;bottom:0;opacity:0;height:auto;transition:all .6s cubic-bezier(.25,.8,.25,1);-webkit-transform:translateZ(0);transform:translateZ(0);backface-visibility:hidden;transition:all .2s ease-in-out,visibility 0s;transform-origin:bottom center;}
.keep-adsme{background:#e74c3c;color:#fff;position:absolute;text-align:center;padding:0 30px 30px 30px;margin:auto;top:30%;left:0;right:0;font-size:1.5rem;line-height:1.5;font-family:monospace;max-width:930px;box-shadow:0 20px 10px -10px rgba(0,0,0,0.15);transition:all .6s cubic-bezier(.25,.8,.25,1);border:15px solid rgba(0,0,0,.07);overflow:hidden;}
.keep-adsme:hover{box-shadow:0 20px 10px -10px rgba(0,0,0,0.2);}
.keep-adsme h4{display:inline-block;background:rgba(0,0,0,.07);padding:5px 25px 15px 25px;font-size:2.2rem;margin:0 auto}
#keep-ads p{margin:0}
#keep-ads a{color:#ffe88b;}#keep-ads a:hover{color:#ffe88b;text-decoration:underline}
#keep-ads.show{left:0;top:0;right:0;z-index:1000;pointer-events:auto;opacity:1;visibility:visible;transform:rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);animation:wobble .7s;opacity:1;}
.close-keep-ads{visibility:hidden;opacity:0;color:#ffe88b;text-align:center;position:absolute;bottom:10px;right:10px;font-size:42px;cursor:pointer;width:30px;height:30px;line-height:30px;border-radius:100%;transition:all .6s cubic-bezier(.25,.8,.25,1);transform:translate(0,50px);}
.close-keep-ads:hover{color:#fff;transform:scale(1.0);}
.keep-adsme:hover .close-keep-ads{visibility:visible;opacity:1;color:#ffe88b;transform:translate(0,0);}
#keep-ads p span {font-family:fontawesome;font-size:5rem;}
@keyframes wobble{0%{transform:scale(0) rotate(-54deg) translatey(40px)}45%{transform:scale(1.1) rotate(20deg) translatey(0px)}60%{transform:scale(1) rotate(-15deg) translatey(0px)}77%{transform:scale(1) rotate(10deg) translatey(0px)}100%{transform:translatey(0)}}

Và phần tiếp Theo các bạn để vào trước thẻ </body>
<!-- adblock -->
<div id='keep-ads'>
<div class='keep-adsme'>
<p><h4>Adblock Detected</h4></p>
<p><span><i aria-hidden='true' class='fa fa-exclamation-triangle'/></span></p>
<p>Like this blog? Keep us running by whitelisting this blog in your ad blocker</p>
<p>This is <a href='/p/privacy-policy.html' target='_blank' title='Show me how'>how to whitelisting</a> this blog in your ad blocker</p>
<p>Thank you</p>
<div class='close-keep-ads' onclick='hidekeep()'>&#215;</div>
</div>
</div>

<script type='text/javascript'>
//<![CDATA[
// Notifikasi Adblocker Adsense
function hidekeep(){document.getElementById("keep-ads").style.display="none"}setTimeout(function(){var e=document.getElementById("keep-ads"),t=document.querySelectorAll("ins.adsbygoogle");0===$(t).height()&&(e.className="show")},2e3);
//]]>
</script>
<!-- end -->

Hoặc các bạn không sữ dụng được tiện ích này thì có thể chuyển qua sữ dụng tiện ích này nhé :>

Cuối cùng các bạn cảm nhận thành quả của mình thôi :D. Chúc các bạn thành công ^^

DEMO.
Ở Phần DEMO này mình đã loại bỏ đi Javascript giúp nhận biết ADBLOCKER rồi nhé. Để mọi người hình dung cho rỏ !





Adblock Detected



Like this blog? Keep us running by whitelisting this blog in your ad blocker
This is how to whitelisting this blog in your ad blocker
Thank you
×


Related post


avatar

Hung.Pro.VN

Nhà thiết kế Web
View Articles

Tôi là admin trang Hung.Pro.VN là một người có đam mê với Blogspot, kinh nghiệm 5 năm thiết kế ra hàng trăm mẫu Template blogpsot như" Bán hàng, bất động sản, landing page, tin tức...

Nhận xét

  1. Hay đây. cảm ơn admin đã chia sẽ :D

    Trả lờiXóa
  2. Ad ơi. sao mình đã thêm vào rồi mà vẫn không có thông báo tắt adblocker hè?? cho m` xin cái ý kiến với :-?

    Trả lờiXóa
    Trả lời
    1. Sao lại ko được bạn "BLACK HAT" bạn thử test trên blog mình là nó sẽ hiện ra thôi :-?. bạn đã làm đúng theo những gì mình hướng dẫn chưa? :(

      Xóa

Đăng nhận xét

Share this article