Automatic Proxitok Error Redirector

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

  1. // ==UserScript==
  2. // @name Automatic Proxitok Error Redirector
  3. // @namespace happyviking
  4. // @version 1.1.0
  5. // @grant none
  6. // @run-at document-end
  7. // @license MIT
  8. // @description Automatically redirects to another proxitok instance if the one you're directed to issues.
  9. // @author HappyViking
  10.  
  11. // <<INSTANCES START HERE>>
  12. // @match https://proxitok.pabloferreiro.es/*
  13. // @match https://proxitok.pussthecat.org/*
  14. // @match https://proxitok.privacydev.net/*
  15. // @match https://tok.habedieeh.re/*
  16. // @match https://proxitok.esmailelbob.xyz/*
  17. // @match https://tok.artemislena.eu/*
  18. // @match https://tok.adminforge.de/*
  19. // @match https://tik.hostux.net/*
  20. // @match https://proxitok.lunar.icu/*
  21. // @match https://proxitok.privacy.com.de/*
  22. // @match https://tiktok.chauvet.pro/*
  23. // @match https://cringe.whateveritworks.org/*
  24. // <<INSTANCES END HERE>>
  25.  
  26. // ==/UserScript==
  27.  
  28. function main() {
  29. const titles = document.getElementsByClassName("title")
  30. for (const title of titles){
  31. if (title.textContent == "There was an error processing your request!"){
  32. const addedMessage = document.createElement("p")
  33. addedMessage.textContent = "Redirecting you to new instance..."
  34. title.parentElement?.appendChild(addedMessage)
  35. location.replace('https://farside.link/proxitok/' + window.location.pathname + window.location.search);
  36. return
  37. }
  38. }
  39. }
  40.  
  41. main()
  42.