This commit is contained in:
parent
be9a72f3a2
commit
b6c98028b9
|
@ -140,30 +140,6 @@ function redirect(url, type, initiator, forceRedirection, incognito) {
|
||||||
case "send": {
|
case "send": {
|
||||||
return randomInstance
|
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": {
|
case "yattee": {
|
||||||
return url.href.replace(/^https?:\/{2}/, "yattee://")
|
return url.href.replace(/^https?:\/{2}/, "yattee://")
|
||||||
}
|
}
|
||||||
|
@ -713,7 +689,6 @@ const defaultInstances = {
|
||||||
'cloudtube': ['https://tube.cadence.moe'],
|
'cloudtube': ['https://tube.cadence.moe'],
|
||||||
'poketube': ['https://poketube.fun'],
|
'poketube': ['https://poketube.fun'],
|
||||||
'proxiTok': ['https://proxitok.pabloferreiro.es'],
|
'proxiTok': ['https://proxitok.pabloferreiro.es'],
|
||||||
'nitter': ['https://nitter.net'],
|
|
||||||
'redlib': ['https://safereddit.com'],
|
'redlib': ['https://safereddit.com'],
|
||||||
'libreddit': ['https://libreddit.spike.codes'],
|
'libreddit': ['https://libreddit.spike.codes'],
|
||||||
'teddit': ['https://teddit.net'],
|
'teddit': ['https://teddit.net'],
|
||||||
|
|
|
@ -161,36 +161,6 @@
|
||||||
"imageType": "png",
|
"imageType": "png",
|
||||||
"url": "https://music.youtube.com"
|
"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": {
|
"bluesky": {
|
||||||
"frontends": {
|
"frontends": {
|
||||||
"skyview": {
|
"skyview": {
|
||||||
|
|
Loading…
Reference in New Issue