(function(window, undefined) {


var checkAds = function(userCallback) {
  window.adblocked.userCallback = userCallback
  var a = new Adblocked()
  a.insert()
}

var done = function() {
  if (typeof(window.google_ad_block) === "undefined")  {
    window.adblocked.result = true
  }
  else {
    window.adblocked.result = false
  }
  window.adblocked.userCallback()
}

window.adblocked = {
  check : checkAds,
  userCallback : function() {},
  callback : done,
  result : "unknown"
}

var Adblocked = function() {

this.scriptFile = "http://pagead2.googlesyndication.com/pagead/show_ads.js";
this.adScript = document.createElement("script")

this.insert = function() {
  var body = document.getElementsByTagName('body')[0]
  var ad = document.createElement("div")
  ad.style.display = "none";
  this.adScript.setAttribute("type","text/javascript")
  this.adScript.setAttribute("src",this.scriptFile)
  body.appendChild(ad).appendChild(this.adScript)
  this.adScript.onload = adblocked.callback;
  this.adScript.onerror = adblocked.callback;
  return this
};

return this;

}

var a = new Adblocked()
a.insert()

})(window)




@@ -785,16 +785,18 @@
 %22none%22;%0A
+//
   this.a
@@ -842,16 +842,18 @@
 cript%22)%0A
+//
   this.a
@@ -896,16 +896,18 @@
 ptFile)%0A
+//
   body.a
@@ -948,16 +948,18 @@
 Script)%0A
+//
   this.a
@@ -995,16 +995,18 @@
 llback;%0A
+//
   this.a
@@ -1043,16 +1043,103 @@
 llback;%0A
+  ad.style.height = %22100px%22;%0A  ad.setAttribute(%22id%22, %22ad-top%22)%0A  body.appendChild(ad)%0A%0A
   return

test div