Automatic Proxitok Error Redirector

Automatically redirects to another proxitok instance if the one you're directed to issues.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Automatic Proxitok Error Redirector
// @namespace    happyviking
// @version      1.1.0
// @grant        none
// @run-at       document-end
// @license      MIT
// @description  Automatically redirects to another proxitok instance if the one you're directed to issues.
// @author       HappyViking

// <<INSTANCES START HERE>>
// @match https://proxitok.pabloferreiro.es/*
// @match https://proxitok.pussthecat.org/*
// @match https://proxitok.privacydev.net/*
// @match https://tok.habedieeh.re/*
// @match https://proxitok.esmailelbob.xyz/*
// @match https://tok.artemislena.eu/*
// @match https://tok.adminforge.de/*
// @match https://tik.hostux.net/*
// @match https://proxitok.lunar.icu/*
// @match https://proxitok.privacy.com.de/*
// @match https://tiktok.chauvet.pro/*
// @match https://cringe.whateveritworks.org/*
// <<INSTANCES END HERE>>

// ==/UserScript==

function main() {
    const titles = document.getElementsByClassName("title")
    for (const title of titles){
        if (title.textContent == "There was an error processing your request!"){
            const addedMessage = document.createElement("p")
            addedMessage.textContent = "Redirecting you to new instance..."
            title.parentElement?.appendChild(addedMessage)
            location.replace('https://farside.link/proxitok/' + window.location.pathname + window.location.search);
            return
        }
    }
}

main()