St3ph32 / Linkvertise Bypass | Updated

// ==UserScript==
// @name         Linkvertise Bypass | Updated
// @namespace    http://t.me/St3ph32
// @version      1.1
// @description  Bypass every Linkvertise link and check.
// @author       St3ph32
// @copyright    2021, St3ph32 (https://openuserjs.org/users/St3ph32)
// @license      MIT
// @updateURL    https://openuserjs.org/meta/St3ph32/Linkvertise_Bypass_Updated.meta.js
// @downloadURL  https://openuserjs.org/install/St3ph32/Linkvertise_Bypass_Updated.user.js
// @match        *://*.linkvertise.com/*
// @match        *://*.linkvertise.net/*
// @match        *://*.link-to.net/*
// @match        *://*.linkbackend2.000webhostapp.com/linkvertisebypass.php?url=*
// @grant        none
// ==/UserScript==
// @run-at       document-start
// @run-at       document-end
// @run-at       document-idle
 
var current_location = document.location;
var string = "linkbackend2.000webhostapp.com/linkvertisebypass.php?url=";
var error = "Error";
 
function redirect() {
    window.location.replace(url);
}
 
function closing() {
    document.close();
}
 
if (current_location.href.indexOf(string) > -1 && current_location.href.indexOf(error) < 1) {
    var url = document.body.innerText;
    if (url.indexOf(error) > -1) {
        document.write("We got an error trying to bypass this link. <br><br> Common errors: <br> - The Linkvertise link is wrong. <br> - Our API got an error, please try again later.");
        window.setTimeout(closing, 1500);
    }
    else {
        document.write("You will get redirected in 15 seconds... <br> This is made to bypass every check. <br><br> Direct access: " + url);
        window.setTimeout(redirect, 15000);
    }
}
else {
    document.location = document.URL.replace('', 'https://linkbackend2.000webhostapp.com/linkvertisebypass.php?url=');
}