Created
May 3, 2020 23:26
-
-
Save cmivxx/30e61815c1384ce576cb3399224f2281 to your computer and use it in GitHub Desktop.
Korean Car Blog generic Ad Blocker code
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
| <script type="text/javascript"> | |
| jQuery(document).ready(function($) { | |
| setTimeout(function() { | |
| if ( typeof(window.google_jobrunner) === "undefined" ) { | |
| //ad blocker installed - show notice | |
| swal({ | |
| title: "Adblocker Detected", | |
| text: "Thanks for visiting The Korean Car Blog.\nWe notice you are using an Ad-block. We ask you to allow ads while you are browsing the blog to help us to continue posting more content for you. \nWe appreciate your support!", | |
| type: "warning", | |
| showCancelButton: true, | |
| confirmButtonColor: "#01A9DB", | |
| confirmButtonText: "Yes, I'll Whitelist", | |
| cancelButtonText: "Cancel", | |
| closeOnConfirm: false, closeOnCancel: false | |
| }, | |
| function(isConfirm){ | |
| if (isConfirm) { | |
| swal("Thank you", "Thank you for whitelisting our website. :)", "success"); | |
| jQuery(".san_howtowhitelist").hide('slow'); | |
| } else { | |
| swal("Oh..", "Oh.. Hope you whitelist our website in your adblocking plugin soon!", "error"); | |
| jQuery(".san_howtowhitelist").hide('slow'); | |
| } | |
| }); | |
| setTimeout(function() { | |
| jQuery(".san_howtowhitelist").css('display', 'flex'); | |
| },2000); | |
| } | |
| }, 10000); | |
| }); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment