Greasy Fork 还支持 简体中文。

Open-Source Alternative Redirector

Redirects you from proprietary web-services to ethical alternatives(front-end).

目前為 2022-03-16 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Open-Source Alternative Redirector
  3. // @namespace -
  4. // @version 0.8
  5. // @description Redirects you from proprietary web-services to ethical alternatives(front-end).
  6. // @author NotYou
  7. // @include *youtube.com/*
  8. // @include *google.com/*
  9. // @include *yahoo.com/*
  10. // @include *bing.com/*
  11. // @include *reddit.com/*
  12. // @include *twitter.com/*
  13. // @include *instagram.com/*
  14. // @include *wikipedia.org/*
  15. // @include *medium.com/*
  16. // @include *i.imgur.com/*
  17. // @include *odysee.com/*
  18. // @include *tiktok.com/*
  19. // @run-at document-start
  20. // @license GPL-3.0-or-later
  21. // @icon https://icons.iconarchive.com/icons/itweek/knob-toolbar/32/Knob-Shuffle-Off-icon.png
  22. // @grant none
  23. // ==/UserScript==
  24.  
  25. /*
  26.  
  27. ﹀ Change Log ﹀
  28.  
  29. 0.8 Version:
  30. - Added Scribe(Medium)
  31. - Added Rimgo(i.imgur)
  32. - Added Librarian(Odysee)
  33. - Added ProxiTok(TikTok)
  34.  
  35. 0.7 Version:
  36. - Removed duckduckgo
  37. - Better instagram redirect
  38. - Added google translate
  39.  
  40. 0.6 Version:
  41. - Redirect from yahoo
  42. - Redirect from bing
  43. - Redirect from duckduckgo
  44.  
  45. 0.5 Version:
  46. - Support for other languages for wikiless/wikipedia
  47. - Better Instances format
  48.  
  49. */
  50.  
  51. var url = new URL(window.location.href)
  52.  
  53. // INSTANCES //
  54. const
  55. invidious = 'yewtu.be',
  56. searx = 'search.mdosch.de',
  57. libreddit = 'reddit.invak.id',
  58. nitter = 'nitter.snopyta.org',
  59. bibliogram = 'bibliogram.pussthecat.org',
  60. wikiless = 'wikiless.org',
  61. lingva = 'lingva.ml',
  62. scribe = 'scribe.rip',
  63. rimgo = 'rimgo.bcow.xyz',
  64. librarian = 'librarian.pussthecat.org',
  65. proxitok = 'proxitok.herokuapp.com'
  66.  
  67. // YouTube | Invidious //
  68. if(window.location.host.indexOf('youtube.com') != -1){
  69. window.location.replace('https://' + invidious + window.location.pathname + window.location.search)
  70. }
  71.  
  72. if(window.location.host.indexOf('google.com') != -1){
  73. // Google Translate | Lingva Translate //
  74. if(window.location.host.indexOf('translate.google.com') != -1){
  75. if(window.location.search === '') {
  76. window.location.replace('https://' + lingva)
  77. } else {
  78. let lang1 = window.location.search.split('&')[0].split('=')[1];
  79. let lang2 = window.location.search.split('&')[1].split('=')[1];
  80. let text = window.location.search.split('&')[2].split('=')[1];
  81. window.location.replace('https://' + lingva + '/' + lang1 + '/' + lang2 + '/' + text)
  82. }
  83. // Google | SearX //
  84. } else if(window.location.host.indexOf('google.com') != -1) {
  85. window.location.replace('https://' + searx + window.location.pathname + window.location.search)
  86. }
  87. }
  88.  
  89. // Yahoo | SearX //
  90. if(window.location.host.indexOf('yahoo.com') != -1){
  91. let search = window.location.search.replace('?p', '?q')
  92. window.location.replace('https://' + searx + window.location.pathname + search)
  93. }
  94.  
  95. // Bing | SearX //
  96. if(window.location.host.indexOf('bing.com') != -1){
  97. window.location.replace('https://' + searx + window.location.pathname + window.location.search)
  98. }
  99.  
  100. // Reddit | Libreddit //
  101. if(window.location.host.indexOf('reddit.com') != -1){
  102. window.location.replace('https://' + libreddit + window.location.pathname + window.location.search)
  103. }
  104.  
  105. // Twitter | Nitter //
  106. if(window.location.host.indexOf('twitter.com') != -1){
  107. window.location.replace('https://' + nitter + window.location.pathname + window.location.search)
  108. }
  109.  
  110. // Instagram | Bibliogram //
  111. if(window.location.host.indexOf('instagram.com') != -1){
  112. if(window.location.pathname === '/accounts/login/') {
  113. let path1 = window.location.search.split('?next=').at(1)
  114. let path = '/u' + path1
  115. window.location.replace('https://' + bibliogram + path)
  116. } else {
  117. window.location.replace('https://' + bibliogram + window.location.pathname + window.location.search)
  118. }
  119. }
  120.  
  121. // Wikipedia | Wikiless //
  122. if(window.location.host.indexOf('wikipedia.org') != -1){
  123. let sub = url.hostname.split('.')[0];
  124. window.location.replace('https://' + wikiless + window.location.pathname + '?lang=' + sub)
  125. }
  126.  
  127. // Medium | Scribe //
  128. if(window.location.host.indexOf('medium.com') != -1){
  129. window.location.replace('https://' + scribe + window.location.pathname + window.location.search)
  130. }
  131.  
  132. // i.Imgur | Rimgo //
  133. if(window.location.host.indexOf('i.imgur.com') != -1){
  134. window.location.replace('https://' + rimgo + window.location.pathname + window.location.search)
  135. }
  136.  
  137. // Odysee | Librarinan //
  138. if(window.location.host.indexOf('odysee.com') != -1){
  139. window.location.replace('https://' + librarian + window.location.pathname + window.location.search)
  140. }
  141.  
  142. // TikTok | ProxiTok //
  143. if(window.location.host.indexOf('tiktok.com') != -1||window.location.host.indexOf('www.tiktok.com') != -1){
  144. window.location.replace('https://' + proxitok + window.location.pathname + window.location.search)
  145. }
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.