As a very quick alternative, it looks a little better, you can use the jQuery-ui dialog (as Ricky Baby said)
You will also need to include jQuery and jQuery-ui libraries on your page. They can be downloaded from http://jquery.com/download/ and http://jqueryui.com/download/ if you do not already have them.
You can change the text "Hello dude ... etc." whatever you like
<html> <head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-lightness/jquery-ui.css" type="text/css" media="all" /> </head> <body style='height: 100%;'> <script type="text/javascript"> function _enabled() { var html = "<div>Adbloc detected</div>"; var diag = $(html).dialog( { autoOpen: true, modal: true, close: function() { $(this).empty().remove(); }, buttons: { "Close": function() { $(this).dialog("close"); } } }); } function _disabled() { var html = "<div>Adbloc NOT detected</div>"; var diag = $(html).dialog( { autoOpen: true, modal: true, close: function() { $(this).empty().remove(); }, buttons: { "Close": function() { $(this).dialog("close"); } } }); } var _abdDetectedFnc = '_enabled'; var _abdNotDetectedFnc = '_disabled'; </script> <script type="text/javascript" src="http://www.adblockdetector.com/script.php"></script> </body> </html>
Alternatively, you can simply put a message at the bottom of the screen if you don't want to pop up at all
<div id='adBlockDetected' style='position: fixed; bottom: 20px; left: 0px; width: 100%; display: none;' >Hey dide .... etc </div>
Then in the function _enabled ()
$("#adBlockDetected").css({display: "block" });
source share