about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/assets/javascripts/services.js25
-rw-r--r--src/config.json30
2 files changed, 0 insertions, 55 deletions
diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js
index 9eefbe20..4e243bb0 100644
--- a/src/assets/javascripts/services.js
+++ b/src/assets/javascripts/services.js
@@ -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://")
 		}
@@ -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'],
diff --git a/src/config.json b/src/config.json
index 4b65e4d5..b70cb074 100644
--- a/src/config.json
+++ b/src/config.json
@@ -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": {