Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

feat(tiktok): support short video links and embeds in TikTok parser

Tonho21d77892f888
diff --git a/browser-extension/chrome/src/detect.js b/browser-extension/chrome/src/detect.js
index 22204295..aebb0e22 100644
--- a/browser-extension/chrome/src/detect.js
+++ b/browser-extension/chrome/src/detect.js
@@ -148,8 +148,11 @@ function parseTikTok(segments) {
return "profile";
}
- const tiktokNonVideo = ["explore", "foryou", "following", "live", "about", "legal", "safety", "transparency"];
- if (segments[0] && !tiktokNonVideo.includes(segments[0])) {
+ // Short video links (/t/<code>) and embeds (/embed/v2/<id>)
+ if (segments[0] === "t" && segments[1]) {
+ return "video";
+ }
+ if (segments[0] === "embed" && segments[1] === "v2" && segments[2]) {
return "video";
}