Super Evil New Tab: Anonymous Autosuggest

This is the code used to show some autosuggest functionality with Super Evil New Tab for Google Chrome.

Custom CSS

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-image: url("https://static.walialu.com/wallpaper-minimal-anonymous-1920x1080.jpg");
    background-color: #1f2229;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

input {
    display: block;
    padding: 5px;
    height: 40px;
    width: 235px;
    transform: rotate(-4deg);
    border: 0 none;
    margin: 24% auto;
    background-color: transparent;
}

ul {
    list-style: none;
    position: absolute;
    transform: rotate(-4deg);
}

ul, li {
    margin: 0;
    padding: 0;
}

li {
    margin: 5px;
    padding: 5px;
    color: #1f2229;
    font-size: 120%;
    border: 3px solid #1f2229;
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
}

Custom JavaScript

var timer = 0;
var searchbox = document.createElement("input");
var suggestbox = document.createElement("ul");

var suggestCallback = function(res) {
  if (!res) return;
  var data = res[1];
  suggestbox.innerHTML = "";
  data.forEach(function(suggest) {
     var li = document.createElement("li");
     li.innerHTML = suggest[0];
     li.onclick = function() {
         googleThis(this.innerText);
     }
     suggestbox.appendChild(li);
  });
};

var googleThis = function(query) {
    top.location.href = "https://www.google.com/search?q=" + query;
}

var searchboxCallback = function(value) {
    var scr = document.createElement("script");
    scr.src="https://www.google.com/complete/search?client=hp&hl=en&sugexp=msedr&gs_rn=62&gs_ri=hp&cp=1&gs_id=9c&q="+
    encodeURIComponent(value)+"&xhr=t&callback=suggestCallback";
    scr.onload = function() {
        this.parentNode.removeChild(this);
    };
    document.body.appendChild(scr);
};

searchbox.addEventListener("keypress", function(evt) {
    if (evt.key === "Enter") {
        googleThis(this.value);
    }
});

searchbox.addEventListener("keyup", function(evt) {
    timer = 0;
    searchboxCallback(this.value);
});

document.body.appendChild(searchbox);
document.body.appendChild(suggestbox);

suggestbox.style.top = searchbox.offsetTop + searchbox.offsetHeight + "px";
suggestbox.style.left = searchbox.offsetLeft + 15 + "px";
suggestbox.style.width = searchbox.offsetWidth - 7 + "px";