if ("console" in window) {
  var styles = [, 'color: hotpink', 'display: block', 'line-height: 40px', 'text-align: center', 'font-weight: bold', 'font-size: 2em'].join(';');
  console.log('%c Such develop such wow you opened the console. ✨', styles);
}

function notify(id) {
  if ("Notification" in window) {
    fireNotification('Ajax has scored!', 'FEY ' + db.get(id).FEY + ' - ' + db.get(id).AJA + ' AJA', 'img/ajax-icon.png', 'ned-bul', 'img/ajax.jpg');
  } else {
    alert("Unfortunately you browser doesn't support browser notifications. :( However you can still use our default notifications.")
  }
}

function askPermission() {
  // Check if something is not 'denied' so that means 'default' or 'granted'.
  if (("Notification" in window) && Notification.permission !== "denied") {
    // API knows it doesn't need to ask for permission if 'granted'.
    Notification.requestPermission();
  }
}

function fireNotification(title, body, icon, tag, image) {
  var options = {
    body: body,
    icon: icon,
    tag: tag,
    image: image,
  }
  var notification = new Notification(title, options);
}

askPermission();

function updateDOM(id) {
  document.getElementsByTagName('H2')[0].innerHTML =
  'Score: '
  + '<br>'
  + 'FEY ' + db.get(id).FEY
  + ' - '
  + db.get(id).AJA + ' AJA'
};

// Use getElementBy for Internet Explorer
function clickLightbox(id) {
  setTimeout(
    function() {
      document.getElementById('lightboxajax').innerHTML =
      '<div id="lightbox">'
      + '<div class="box">'
      + '<button onclick="removeBox()">close ✖</button>'
      + '<p>Ajax has scored a goal!</p>'
      + '<p><strong>The current standing is:</strong></p>'
      +  '<p>FEY ' + db.get(id).FEY + ' - ' + db.get(id).AJA + ' AJA</p>'
      +  '</div>';
      +  '</div>';
    }, 3000
  )
}

var element = document.getElementById('clickLightbox');

// AttachEvent for older IE
element.attachEvent("onclick", onButtonClick);

var counter = 0;

function onButtonClick(event) {
  notify(counter);
  clickLightbox(counter);
  updateDOM(counter);
  counter++;
}

function removeBox() {
  var removeBox = document.getElementById('lightbox');
  removeBox.parentNode.removeChild(removeBox);
}

@@ -1044,16 +1044,46 @@
 ge,%0A  %7D%0A
+  setTimeout(function() %7B%0A    
   var no
@@ -1129,16 +1129,32 @@
 tions);%0A
+    %7D, 3000%0A  )%0A
 %7D%0A%0AaskPe
@@ -1191,16 +1191,51 @@
 M(id) %7B%0A
+  setTimeout(%0A    function() %7B%0A    
   docume
@@ -1279,16 +1279,20 @@
 rHTML =%0A
+    
   'Score
@@ -1295,16 +1295,20 @@
 core: '%0A
+    
   + '%3Cbr
@@ -1310,16 +1310,20 @@
  '%3Cbr%3E'%0A
+    
   + 'FEY
@@ -1342,16 +1342,20 @@
 id).FEY%0A
+    
   + ' - 
@@ -1356,16 +1356,20 @@
 + ' - '%0A
+    
   + db.g
@@ -1388,16 +1388,32 @@
  ' AJA'%0A
+    %7D, 3000%0A  )%0A
 %7D;%0A%0A// U
@@ -1969,16 +1969,81 @@
 box');%0A%0A
+// Check if attachEvent is in window%0Aif (window.attachEvent) %7B%0A  
 // Attac
@@ -2062,16 +2062,18 @@
 lder IE%0A
+  
 element.
@@ -2110,16 +2110,62 @@
 nClick);
+%0A%7D else %7B%0A  element.onclick = onButtonClick;%0A%7D
 %0A%0Avar co

Fix attachEvent ie