[DEPRECATED] lol just redirect to nitter

Nitter is basically dead. This essentially redirects to a dead site now, making this script essentially pointless. Thanks, Elon.

  1. // ==UserScript==
  2. // @name [DEPRECATED] lol just redirect to nitter
  3. // @namespace https://git.froggi.es/tom/redirect-to-nitter-n-shit/
  4. // @namespace https://gf.qytechs.cn/en/scripts/448085-lol-just-redirect-to-nitter
  5. // @version 0.10211
  6. // @license GNU GPLv3
  7. // @description Nitter is basically dead. This essentially redirects to a dead site now, making this script essentially pointless. Thanks, Elon.
  8. // @author tom
  9. // @match https://twitter.com/*
  10. // @icon https://git.froggi.es/tom/redirect-to-nitter-n-shit/raw/branch/main/icon.ico
  11. // @grant none
  12. // ==/UserScript==
  13. // Settings
  14. let timelineRedirect = true; // Redirect on main home page/timeline? true/false (script's still a wip so getting redirected to nitter by clicking on a tweet on the twitter timeline isn't programmed in yet. true by default until then.)
  15. let nitterInstance = "https://nitter.ca/"; // (PLEASE INCLUDE "https://" AT THE START OF THE DOMAIN AND "/" AT THE END) | What Nitter instance you'd like to be redirected to. Using ".ca" as default because it's the best instance I personally know, I also recommend "twiit.com", which selects an instance that's running well and isn't rate-limited.
  16. //
  17. // console.log("is this even loading");
  18. let href = document.location.href;
  19. var ofm = href.split("/");
  20. for (var i = 0; i < 2; i++) {
  21. ofm.shift();
  22. }
  23. // console.log(ofm);
  24. var goTo = nitterInstance;
  25. if (ofm[1] == "home" || ofm[1] == "" || ofm[1] == "i") {
  26. console.log("j");
  27. if (timelineRedirect == false) {
  28. goTo = "false";
  29. }
  30. } else {
  31. for (var m = 1; m < ofm.length; m++) {
  32. goTo += ofm[m] + "/";
  33. }
  34. }
  35. if (goTo == "false") {
  36. // console.log("no");
  37. } else {
  38. // console.info("this was supposed to redirect to " + goTo);
  39. document.location = goTo;
  40. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址