ManeraKai 2023-09-17 18:53:55 +03:00
parent 2453c19269
commit 7f97244775
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
3 changed files with 103 additions and 3 deletions

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@ -517,6 +517,24 @@ function redirect(url, type, initiator, forceRedirection) {
}
return `${randomInstance}${url.pathname}${url.search}`
}
case "tuboYoutube": {
if (url.pathname.startsWith("/channel")) {
return `${randomInstance}/channel?url=${encodeURIComponent(url.href)}`
}
if (url.pathname.startsWith("/watch")) {
return `${randomInstance}/stream?url=${encodeURIComponent(url.href)}`
}
return `${randomInstance}`
}
case "tuboSoundcloud": {
if (url.pathname.match(/\/user[^\/]+(\/$|$)/)) {
return `${randomInstance}/channel?url=${encodeURIComponent(url.href)}`
}
if (url.pathname.match(/\/user[^\/]+\/[^\/]+/)) {
return `${randomInstance}/stream?url=${encodeURIComponent(url.href)}`
}
return `${randomInstance}`
}
default: {
return `${randomInstance}${url.pathname}${url.search}`
}
@ -670,7 +688,9 @@ const defaultInstances = {
'destructables': ['https://ds.vern.cc'],
'wtfismyip': ['https://myip.wtf'],
'safetwitch': ['https://safetwitch.drgns.space'],
'proxigram': ['https://proxigram.privacyfrontends.repl.co']
'proxigram': ['https://proxigram.privacyfrontends.repl.co'],
'tuboYoutube': ['https://tubo.migalmoreno.com'],
'tuboSoundcloud': ['https://tubo.migalmoreno.com'],
}
function initDefaults() {

View File

@ -60,7 +60,21 @@
"name": "CloudTube",
"embeddable": false,
"instanceList": true,
"url": "https://sr.ht/~cadence/tube/"
"url": "https://sr.ht/~cadence/tube",
"excludeTargets": [
2,
3
]
},
"tuboYoutube": {
"name": "Tubo",
"embeddable": false,
"instanceList": true,
"url": "https://github.com/migalmoreno/tubo",
"excludeTargets": [
2,
3
]
},
"freetube": {
"excludeTargets": [
@ -213,7 +227,7 @@
}
},
"targets": [
"^https?:\\/{2}(www\\.)?instagram\\.com\\/?"
"^https?:\\/{2}(www\\.)?instagram\\.com"
],
"name": "Instagram",
"options": {
@ -299,6 +313,29 @@
"imageType": "svg",
"url": "https://www.pixiv.net"
},
"soundcloud": {
"frontends": {
"tuboSoundcloud": {
"name": "Tubo",
"embeddable": false,
"instanceList": true,
"url": "https://github.com/migalmoreno/tubo"
}
},
"targets": [
"^https?:\\/{2}soundcloud\\.com"
],
"name": "SoundCloud",
"options": {
"enabled": false,
"redirectType": "main_frame",
"frontend": "tuboSoundcloud",
"unsupportedUrls": "bypass"
},
"imageType": "svg",
"embeddable": false,
"url": "https://soundcloud.com"
},
"medium": {
"frontends": {
"scribe": {