Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ifloader 1.1.0 by Golden. Loads the latest version of ifpass, using Pastebin. Requires an internet connection. */
- /* This version doesn't require jQuery! */
- var pastebin = "https://api.allorigins.win/get?url=" + "https://pastebin.com/raw/k4mc1nZE";
- var ifloaded;
- var func = () => {
- if ( !ifloaded ) {
- document.body.innerHTML += "ifloader 1.1.0 by Golden. Pastebin: https://pastebin.com/WP8ARKNU";
- console.log("Loading ifloader...");
- var getIFPASS = new XMLHttpRequest();
- var response = null;
- getIFPASS.open("GET", pastebin, true); /* true for asynchronous */
- getIFPASS.onreadystatechange = () => {
- if (getIFPASS.readyState === 4) {
- if (getIFPASS.status === 200) {
- var script = document.createElement("script");
- response = getIFPASS.responseText;
- /* console.log(JSON.parse(response).contents); */
- document.body.innerHTML += "<br>Loading ifpass...";
- console.log("Loading ifpass...");
- document.body.innerHTML = "";
- document.body.appendChild(script).src = JSON.parse(response).contents;
- } else {
- if (getIFPASS.status !== 0) {
- document.body.innerHTML += '<p style="color:red">HTTP Error ' + getIFPASS.status + '! Reloading page in 5 seconds...</p>';
- console.log("HTTP Error " + getIFPASS.status + "! Reloading page in 5 seconds...");
- } else {
- document.body.innerHTML += '<p style="color:red">Reconnect to the Internet. Reloading page in 5 seconds...</p>';
- console.log("Reconnect to the Internet. Reloading page in 5 seconds...");
- }
- setTimeout(() => {document.location.reload()}, 5000);
- }
- console.log("HTTP Status: " + getIFPASS.status);
- }
- };
- getIFPASS.send(null);
- document.body.innerHTML += "<br>Downloading the latest version of ifpass...";
- console.log("Downloading the latest version of ifpass...");
- };
- ifloaded = true;
- };
- if (!ifloaded) {
- document.body.innerHTML = "";
- document.head.innerHTML += "<style> element { margin:0; padding:0; font-size:100%; line-height:1; } </style>";
- try {
- func();
- } catch {
- setTimeout(func, 2000);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement