New Instance Button for Libreddit

Adds a button to Libreddit instances to redirect to a new instance

目前為 2023-09-16 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name New Instance Button for Libreddit
  3. // @namespace happyviking
  4. // @version 1.34.0
  5. // @grant none
  6. // @run-at document-end
  7. // @license MIT
  8. // @description Adds a button to 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.freedit.eu/*
  16. // @match https://libreddit.hu/*
  17. // @match https://libreddit.kylrth.com/*
  18. // @match https://libreddit.lunar.icu/*
  19. // @match https://libreddit.mha.fi/*
  20. // @match https://libreddit.northboot.xyz/*
  21. // @match https://libreddit.oxymagnesium.com/*
  22. // @match https://libreddit.privacydev.net/*
  23. // @match https://libreddit.pussthecat.org/*
  24. // @match https://libreddit.spike.codes/*
  25. // @match https://libreddit.strongthany.cc/*
  26. // @match https://libreddit.tiekoetter.com/*
  27. // @match https://lr.4201337.xyz/*
  28. // @match https://lr.aeong.one/*
  29. // @match https://lr.artemislena.eu/*
  30. // @match https://lr.slipfox.xyz/*
  31. // @match https://r.walkx.fyi/*
  32. // @match https://reddit.invak.id/*
  33. // @match https://reddit.rtrace.io/*
  34. // @match https://reddit.simo.sh/*
  35. // @match https://reddit.smnz.de/*
  36. // @match https://reddit.utsav2.dev/*
  37. // @match https://safereddit.com/*
  38. // @match https://snoo.habedieeh.re/*
  39. // @match https://libreddit.kutay.dev/*
  40. // @match https://libreddit.projectsegfau.lt/*
  41. // @match https://libreddit.tux.pizza/*
  42. // @match https://lr.vern.cc/*
  43. // @match https://r.darklab.sh/*
  44. // @match https://reddit.leptons.xyz/*
  45. // @match https://discuss.whatever.social/*
  46. // @match https://libreddit.kavin.rocks/*
  47. // @match https://libreddit.cachyos.org/*
  48. // @match https://libreddit.domain.glass/*
  49. // @match https://libreddit.privacy.com.de/*
  50. // @match https://reddit.baby/*
  51. // <<INSTANCES END HERE>>
  52.  
  53.  
  54. // ==/UserScript==
  55.  
  56. function main() {
  57. const navBar = document.querySelector('nav');
  58. if (!navBar) return
  59. const firstDivInNavBar = navBar.querySelector("div")
  60. const newButton = document.createElement("button")
  61. firstDivInNavBar.prepend(newButton)
  62. newButton.appendChild(document.createTextNode("New Instance"))
  63. newButton.onclick = () => {
  64. location.replace('https://farside.link/libreddit/' + window.location.pathname + window.location.search);
  65. }
  66. }
  67.  
  68. main()

QingJ © 2025

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