From 0a712d7a8ca2c3458677861d9dacf81c4b7939e4 Mon Sep 17 00:00:00 2001 From: flashwave Date: Mon, 28 Oct 2024 19:47:15 +0000 Subject: [PATCH] One more for testing. --- uiharu.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uiharu.ts b/uiharu.ts index 2e0f90c..daef591 100644 --- a/uiharu.ts +++ b/uiharu.ts @@ -94,7 +94,7 @@ const allowOEmbed: String[] = [ // copied from wordpress source sorta '.edgii.net', ]; -const appVersion: String = '20241028'; +const appVersion: String = '20241029'; const isDebug: Boolean = existsSync(pathJoin(import.meta.dirname, '.debug')); const cache: MemcacheClient = new MemcacheClient({ server: memcacheServer, @@ -389,6 +389,8 @@ const extractOEmbedData = async (response: Response, html, url: string, urlInfo: oEmbedUrl = `https://soundcloud.com/oembed?format=json&url=${encodeURIComponent(url)}`; else if(isDomainSuffix('tiktok.com', urlInfo.host)) oEmbedUrl = `https://www.tiktok.com/oembed?url=${encodeURIComponent(url)}`; + else if(isDomainSuffix('mixcloud.com', urlInfo.host)) + oEmbedUrl = `https://app.mixcloud.com/oembed/?url=${encodeURIComponent(url)}`; else if(html !== undefined) oEmbedUrl = html('link[rel="alternate"][type="application/json+oembed"]').first()?.attr('href')?.trim() ?? '';