New Instance Button for Redlib

Adds a button to Redlib (previously Libreddit) instances to redirect to a new instance.

Verze ze dne 31. 05. 2024. Zobrazit nejnovější verzi.

  1. // ==UserScript==
  2. // @name New Instance Button for Redlib
  3. // @namespace happyviking
  4. // @version 1.48.0
  5. // @grant none
  6. // @run-at document-end
  7. // @license MIT
  8. // @description Adds a button to Redlib (previously Libreddit) instances to redirect to a new instance.
  9. // @icon https://gitlab.com/uploads/-/system/project/avatar/32545239/libreddit.png
  10. // @author HappyViking
  11.  
  12. // <<INSTANCES START HERE>>
  13. // @match https://l.opnxng.com/*
  14. // @match https://libreddit.bus-hit.me/*
  15. // @match https://libreddit.projectsegfau.lt/*
  16. // @match https://lr.ggtyler.dev/*
  17. // @match https://lr.n8pjl.ca/*
  18. // @match https://r.darrennathanael.com/*
  19. // @match https://red.artemislena.eu/*
  20. // @match https://red.ngn.tf/*
  21. // @match https://reddit.idevicehacked.com/*
  22. // @match https://reddit.nerdvpn.de/*
  23. // @match https://reddit.owo.si/*
  24. // @match https://redlib.baczek.me/*
  25. // @match https://redlib.catsarch.com/*
  26. // @match https://redlib.dnfetheus.xyz/*
  27. // @match https://redlib.ducks.party/*
  28. // @match https://redlib.freedit.eu/*
  29. // @match https://redlib.incogniweb.net/*
  30. // @match https://redlib.kittywi.re/*
  31. // @match https://redlib.nadeko.net/*
  32. // @match https://redlib.nezumi.party/*
  33. // @match https://redlib.nohost.network/*
  34. // @match https://redlib.perennialte.ch/*
  35. // @match https://redlib.privacy.deals/*
  36. // @match https://redlib.privacyredirect.com/*
  37. // @match https://redlib.seasi.dev/*
  38. // @match https://redlib.tux.pizza/*
  39. // @match https://redlib.vimmer.dev/*
  40. // @match https://rl.bloat.cat/*
  41. // @match https://safereddit.com/*
  42. // @match https://libreddit.eu.org/*
  43. // @match https://libreddit.privacydev.net/*
  44. // @match https://reddit.invak.id/*
  45. // @match https://redlib.cow.rip/*
  46. // @match https://redlib.r4fo.com/*
  47. // @match https://redlib.xn--hackerhhle-kcb.org/*
  48. // @match https://eu.safereddit.com/*
  49. // @match https://redlib.matthew.science/*
  50. // @match https://libreddit.freedit.eu/*
  51. // @match https://libreddit.hu/*
  52. // @match https://libreddit.kylrth.com/*
  53. // @match https://libreddit.lunar.icu/*
  54. // @match https://libreddit.mha.fi/*
  55. // @match https://libreddit.northboot.xyz/*
  56. // @match https://libreddit.oxymagnesium.com/*
  57. // @match https://libreddit.pussthecat.org/*
  58. // @match https://libreddit.spike.codes/*
  59. // @match https://libreddit.strongthany.cc/*
  60. // @match https://libreddit.tiekoetter.com/*
  61. // @match https://lr.4201337.xyz/*
  62. // @match https://lr.aeong.one/*
  63. // @match https://lr.artemislena.eu/*
  64. // @match https://lr.slipfox.xyz/*
  65. // @match https://r.walkx.fyi/*
  66. // @match https://reddit.rtrace.io/*
  67. // @match https://reddit.simo.sh/*
  68. // @match https://reddit.smnz.de/*
  69. // @match https://reddit.utsav2.dev/*
  70. // @match https://snoo.habedieeh.re/*
  71. // @match https://libreddit.kutay.dev/*
  72. // @match https://libreddit.tux.pizza/*
  73. // @match https://lr.vern.cc/*
  74. // @match https://r.darklab.sh/*
  75. // @match https://reddit.leptons.xyz/*
  76. // @match https://discuss.whatever.social/*
  77. // @match https://libreddit.kavin.rocks/*
  78. // @match https://libreddit.cachyos.org/*
  79. // @match https://libreddit.domain.glass/*
  80. // @match https://libreddit.privacy.com.de/*
  81. // @match https://reddit.baby/*
  82. // <<INSTANCES END HERE>>
  83.  
  84.  
  85. // ==/UserScript==
  86.  
  87. function main() {
  88. const navBar = document.querySelector('nav');
  89. if (!navBar) return
  90. const firstDivInNavBar = navBar.querySelector("div")
  91. const newButton = document.createElement("button")
  92. firstDivInNavBar.prepend(newButton)
  93. newButton.appendChild(document.createTextNode("New Instance"))
  94. newButton.onclick = () => {
  95. location.replace('https://farside.link/redlib/' + window.location.pathname + window.location.search);
  96. }
  97. }
  98.  
  99. main()