Libre Frontend Redirect

Gives buttom to redirect from a Libre Frontend instance to another instance to counter rate-limiting. (Currently Supported: Reddit, Quora. Planned: Youtube, github, etc)

  1. // ==UserScript==
  2. // @name Libre Frontend Redirect
  3. // @namespace https://kolektiva.social/@helios97
  4. // @version 1.3
  5. // @description Gives buttom to redirect from a Libre Frontend instance to another instance to counter rate-limiting. (Currently Supported: Reddit, Quora. Planned: Youtube, github, etc)
  6. // @author Helios97
  7. // @license GNU GPLv3
  8.  
  9. // @match https://safereddit.com/*
  10. // @match https://libreddit.kavin.rocks/*
  11. // @match https://libreddit.privacy.com.de/*
  12. // @match https://reddit.baby/*
  13. // @match https://libreddit.domain.glass/*
  14. // @match https://libreddit.northboot.xyz/*
  15. // @match https://libreddit.privacydev.net/*
  16. // @match https://l.opnxng.com/*
  17. // @match https://rd.funami.tech/*
  18. // @match https://libreddit.oxymagnesium.com/*
  19. // @match https://libreddit.freedit.eu/*
  20. // @match https://lr.4201337.xyz/*
  21. // @match https://lr.artemislena.eu/*
  22. // @match https://lr.aeong.one/*
  23. // @match https://reddit.smnz.de/*
  24. // @match https://libreddit.bus-hit.me/*
  25. // @match https://reddit.leptons.xyz/*
  26. // @match https://libreddit.lunar.icu/*
  27. // @match https://reddit.moe.ngo/*
  28. // @match https://r.darklab.sh/*
  29. // @match https://snoo.habedieeh.re/*
  30. // @match https://libreddit.kutay.dev/*
  31. // @match https://libreddit.tux.pizza/*
  32.  
  33. // @match https://quetre.iket.me/*
  34. // @match https://quora.vern.cc/*
  35. // @match https://quetre.pussthecat.org/*
  36. // @match https://quetre.tokhmi.xyz/*
  37. // @match https://quetre.projectsegfau.lt/*
  38. // @match https://quetre.odyssey346.dev/*
  39. // @match https://quetre.privacydev.net/*
  40. // @match https://ask.habedieeh.re/*
  41. // @match https://quetre.blackdrgn.nl/*
  42. // @match https://quetre.lunar.icu/*
  43. // @match https://que.wilbvr.me/*
  44. // @match https://quora.femboy.hu/*
  45. // @match https://questions.whateveritworks.org/*
  46. // @match https://quetre.fascinated.cc/*
  47. // @match https://quetre.frontendfriendly.xyz/*
  48.  
  49. // @grant none
  50. // @run-at document-end
  51. // ==/UserScript==
  52.  
  53. // Credit to https://gf.qytechs.cn/en/scripts/469587-reddit-to-libreddit-redirect
  54. // Refactored for general purpose redirect logic, cosmetic changes for mobile friendliness.
  55.  
  56. (function() {
  57. 'use strict';
  58.  
  59. // List of Libreddit instances
  60. var libredditInstances = [
  61. 'safereddit.com',
  62. 'libreddit.kavin.rocks',
  63. 'libreddit.privacy.com.de',
  64. 'reddit.baby',
  65. 'libreddit.domain.glass',
  66. 'libreddit.northboot.xyz',
  67. 'libreddit.privacydev.net',
  68. 'l.opnxng.com',
  69. 'rd.funami.tech',
  70. 'libreddit.oxymagnesium.com',
  71. 'libreddit.freedit.eu',
  72. 'lr.4201337.xyz',
  73. 'lr.artemislena.eu',
  74. 'lr.aeong.one',
  75. 'reddit.smnz.de',
  76. 'libreddit.bus-hit.me',
  77. 'reddit.leptons.xyz',
  78. 'libreddit.lunar.icu',
  79. 'reddit.moe.ngo',
  80. 'r.darklab.sh',
  81. 'snoo.habedieeh.re',
  82. 'libreddit.kutay.dev',
  83. 'libreddit.tux.pizza'
  84. ];
  85.  
  86. // List of Quetre instances
  87. var quetreInstances = [
  88. 'quetre.iket.me',
  89. 'quora.vern.cc',
  90. 'quetre.pussthecat.org',
  91. 'quetre.tokhmi.xyz',
  92. 'quetre.projectsegfau.lt',
  93. 'quetre.odyssey346.dev',
  94. 'quetre.privacydev.net',
  95. 'ask.habedieeh.re',
  96. 'quetre.blackdrgn.nl',
  97. 'quetre.lunar.icu',
  98. 'que.wilbvr.me',
  99. 'quora.femboy.hu',
  100. 'questions.whateveritworks.org',
  101. 'quetre.fascinated.cc',
  102. 'quetre.frontendfriendly.xyz'
  103. ];
  104.  
  105. // Get the current instance
  106. var currentInstance = window.location.hostname;
  107.  
  108. // Check for kind of instance
  109. let instances;
  110.  
  111. if (libredditInstances.includes(currentInstance)) {
  112. instances = libredditInstances;
  113. } else if (quetreInstances.includes(currentInstance)) {
  114. instances = quetreInstances;
  115. }
  116.  
  117.  
  118. // Create the reload button
  119. var reloadButton = document.createElement('button');
  120. reloadButton.textContent = '⇄';
  121. reloadButton.style.position = 'fixed';
  122. reloadButton.style.bottom = '20px';
  123. reloadButton.style.right = '20px';
  124. reloadButton.style.zIndex = '9999';
  125. reloadButton.style.padding = '8px 12px';
  126. reloadButton.style.fontSize = '20px';
  127. reloadButton.style.fontWeight = 'bold';
  128. reloadButton.style.color = '#fff';
  129. reloadButton.style.backgroundColor = '#0079d3';
  130. reloadButton.style.border = 'none';
  131. reloadButton.style.borderRadius = '4px';
  132. reloadButton.style.cursor = 'pointer';
  133.  
  134. // Add event listener to reload button
  135. reloadButton.addEventListener('click', function() {
  136. // Redirect to a random instance
  137. var randomInstance = instances[Math.floor(Math.random() * instances.length)];
  138. window.location.href = 'https://' + randomInstance + window.location.pathname + window.location.search + window.location.hash;
  139. });
  140.  
  141. // Append the reload button to the document body
  142. document.body.appendChild(reloadButton);
  143. })();

QingJ © 2025

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