tiktok is back!

- added support for tiktok (images won't work, they're only accessible through the app)
- hopefully main input bar is now not rounded on ios, i fucking hate apple
- if service is not supported, a correlating error will appear, not generic one
- removed duplicates from config that are present in package json already
- tiny bit of clean up
This commit is contained in:
wukko
2022-07-28 22:03:17 +06:00
parent a4a9af6120
commit 1b4872c1de
12 changed files with 86 additions and 41 deletions

View File

@@ -21,11 +21,12 @@ export async function getJSON(originalURL, ip, lang, format, quality) {
if (host && host.length < 20 && host in patterns && patterns[host]["enabled"]) {
for (let i in patterns[host]["patterns"]) {
patternMatch = new UrlPattern(patterns[host]["patterns"][i]).match(cleanURL(url, host).split(".com/")[1]);
if (patternMatch) break;
}
if (patternMatch) {
return await match(host, patternMatch, url, ip, lang, format, quality);
} else throw Error()
} else throw Error()
} return apiJSON(0, { t: errorUnsupported(lang) } )
} return apiJSON(0, { t: errorUnsupported(lang) } )
} else {
return apiJSON(0, { t: errorUnsupported(lang) } )
}