Skip to content

Commit

Permalink
Added Troddit #1002
Browse files Browse the repository at this point in the history
  • Loading branch information
ManeraKai committed Jan 20, 2025
1 parent 4fe2688 commit 95f2fae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/assets/javascripts/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,17 +230,16 @@ function rewrite(url, originUrl, frontend, randomInstance, type) {
return `${randomInstance}/preview/external-pre${url.pathname}${url.search}`
case "i":
return `${randomInstance}/img${url.pathname}`
default:
return `${randomInstance}/comments${url.pathname}`
}
return randomInstance
return `${randomInstance}/comments${url.pathname}`
}
case "teddit":
if (/^(?:(?:external-)?preview|i)\.redd\.it/.test(url.hostname)) {
if (url.search == "") return `${randomInstance}${url.pathname}?teddit_proxy=${url.hostname}`
else return `${randomInstance}${url.pathname}${url.search}&teddit_proxy=${url.hostname}`
}
return `${randomInstance}${url.pathname}${url.search}`
case "troddit":
case "eddrit":
if (/^(?:(?:external-)?preview|i)\.redd\.it/.test(url.hostname)) return randomInstance
return `${randomInstance}${url.pathname}${url.search}`
Expand Down Expand Up @@ -853,6 +852,7 @@ const defaultInstances = {
proxiTok: ["https://proxitok.pabloferreiro.es"],
redlib: ["https://safereddit.com"],
eddrit: ["https://eddrit.com"],
troddit: ["https://www.troddit.com"],
scribe: ["https://scribe.rip"],
libMedium: ["https://md.vern.cc"],
quetre: ["https://quetre.iket.me"],
Expand Down
8 changes: 7 additions & 1 deletion src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,12 @@
"instanceList": true,
"url": "https://github.com/corenting/eddrit",
"localhost": false
},
"troddit": {
"name": "Troddit",
"instanceList": false,
"url": "https://github.com/burhan-syed/troddit",
"localhost": false
}
},
"targets": [
Expand Down Expand Up @@ -1265,7 +1271,7 @@
},
"ultimateTab": {
"name": "Ultimate Tab",
"instanceList": true,
"instanceList": false,
"url": "https://github.com/BenoitBellegarde/UltimateTab"
}
},
Expand Down

0 comments on commit 95f2fae

Please sign in to comment.