document.onreadystatechange = function() {
    setTimeout(function() {
          if (document.readyState !== "complete") {
              document.querySelector(
                "body").style.visibility = "hidden";
              document.querySelector(
                "#loftloader-wrapper").style.visibility = "visible";
          } else {
              document.querySelector(
                "#loftloader-wrapper").style.display = "none";
              document.querySelector(
                "body").style.visibility = "visible";
          }
    }, 3000);
  };