Skip to content

Commit

Permalink
Removed Nitter #898
Browse files Browse the repository at this point in the history
  • Loading branch information
ManeraKai committed Mar 10, 2024
1 parent be9a72f commit b6c9802
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 55 deletions.
25 changes: 0 additions & 25 deletions src/assets/javascripts/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,30 +140,6 @@ function redirect(url, type, initiator, forceRedirection, incognito) {
case "send": {
return randomInstance
}
case "nitter": {
let search = new URLSearchParams(url.search)

search.delete("ref_src")
search.delete("ref_url")
search.delete("s") // type of device that shared the link
search.delete("t") // some sort of tracking ID

search = search.toString()
if (search !== "") search = `?${search}`

if (url.host.split(".")[0] === "pbs" || url.host.split(".")[0] === "video") {
try {
const [, id, format, extra] = search.match(/(.*)\?format=(.*)&(.*)/)
const query = encodeURIComponent(`${id}.${format}?${extra}`)
return `${randomInstance}/pic${url.pathname}${query}`
} catch {
return `${randomInstance}/pic${url.pathname}${search}`
}
}
if (url.pathname.split("/").includes("tweets")) return `${randomInstance}${url.pathname.replace("/tweets", "")}${search}`
if (url.host == "t.co") return `${randomInstance}/t.co${url.pathname}`
return `${randomInstance}${url.pathname}${search}#m`
}
case "yattee": {
return url.href.replace(/^https?:\/{2}/, "yattee://")
}
Expand Down Expand Up @@ -713,7 +689,6 @@ const defaultInstances = {
'cloudtube': ['https://tube.cadence.moe'],
'poketube': ['https://poketube.fun'],
'proxiTok': ['https://proxitok.pabloferreiro.es'],
'nitter': ['https://nitter.net'],
'redlib': ['https://safereddit.com'],
'libreddit': ['https://libreddit.spike.codes'],
'teddit': ['https://teddit.net'],
Expand Down
30 changes: 0 additions & 30 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,36 +161,6 @@
"imageType": "png",
"url": "https://music.youtube.com"
},
"twitter": {
"frontends": {
"nitter": {
"name": "Nitter",
"embeddable": true,
"instanceList": true,
"url": "https://github.com/zedeus/nitter",
"localhost": true
}
},
"targets": [
"^https?:\\/{2}(www\\.|mobile\\.)?twitter\\.com\\/",
"^https?:\\/{2}(www\\.|mobile\\.)?x\\.com\\/",
"^https?:\\/{2}(pbs\\.|video\\.)twimg\\.com\\/",
"^https?:\\/{2}platform\\.x\\.com/embed\\/",
"^https?:\\/{2}platform\\.twitter\\.com/embed\\/",
"^https?:\\/{2}t\\.co\\/"
],
"name": "Twitter",
"options": {
"enabled": false,
"redirectType": "main_frame",
"unsupportedUrls": "bypass",
"frontend": "nitter",
"instance": "public"
},
"imageType": "png",
"embeddable": true,
"url": "https://twitter.com"
},
"bluesky": {
"frontends": {
"skyview": {
Expand Down

0 comments on commit b6c9802

Please sign in to comment.