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:
@@ -35,7 +35,7 @@ export function msToTime(d) {
|
||||
return r;
|
||||
}
|
||||
export function cleanURL(url, host) {
|
||||
url = url.replace('}', '').replace('{', '').replace(')', '').replace('(', '').replace(' ', '');
|
||||
url = url.replace('}', '').replace('{', '').replace(')', '').replace('(', '').replace(' ', '').replace('@', '');
|
||||
if (url.includes('youtube.com/shorts/')) {
|
||||
url = url.split('?')[0].replace('shorts/', 'watch?v=');
|
||||
}
|
||||
@@ -51,4 +51,9 @@ export function cleanURL(url, host) {
|
||||
}
|
||||
export function languageCode(req) {
|
||||
return req.header('Accept-Language') ? req.header('Accept-Language').slice(0, 2) : "en"
|
||||
}
|
||||
export function unicodeDecode(str) {
|
||||
return str.replace(/\\u[\dA-F]{4}/gi, (unicode) => {
|
||||
return String.fromCharCode(parseInt(unicode.replace(/\\u/g, ""), 16));
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user