diff --git a/public/index.html b/public/index.html
index 7ecdff29..566dc589 100644
--- a/public/index.html
+++ b/public/index.html
@@ -8,7 +8,7 @@
+ content="default-src 'self'; child-src 'none'; worker-src 'self'; frame-src youtube.com www.youtube.com https://platform.twitter.com https://embed.tidal.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; connect-src wss://* 'self' https://*; img-src * data:; font-src https://fonts.gstatic.com; media-src *; script-src 'self' https://static.cloudflareinsights.com https://platform.twitter.com https://embed.tidal.com;" />
diff --git a/src/Const.ts b/src/Const.ts
index 0ccfbbea..1464459c 100644
--- a/src/Const.ts
+++ b/src/Const.ts
@@ -84,3 +84,8 @@ export const TweetUrlRegex = /https?:\/\/twitter\.com\/(?:#!\/)?(\w+)\/status(?:
* Hashtag regex
*/
export const HashtagRegex = /(#[^\s!@#$%^&*()=+.\/,\[{\]};:'"?><]+)/;
+
+/**
+ * Tidal share link regex
+ */
+export const TidalRegex = /tidal\.com\/browse\/(\w+)\/([a-z0-9-]+)/i;
\ No newline at end of file
diff --git a/src/Element/Text.tsx b/src/Element/Text.tsx
index 9f56e3ba..367922df 100644
--- a/src/Element/Text.tsx
+++ b/src/Element/Text.tsx
@@ -4,7 +4,7 @@ import { Link } from "react-router-dom";
import ReactMarkdown from "react-markdown";
import { TwitterTweetEmbed } from "react-twitter-embed";
-import { UrlRegex, FileExtensionRegex, MentionRegex, InvoiceRegex, YoutubeUrlRegex, TweetUrlRegex, HashtagRegex } from "Const";
+import { UrlRegex, FileExtensionRegex, MentionRegex, InvoiceRegex, YoutubeUrlRegex, TweetUrlRegex, HashtagRegex, TidalRegex } from "Const";
import { eventLink, hexToBech32 } from "Util";
import Invoice from "Element/Invoice";
import Hashtag from "Element/Hashtag";
@@ -12,12 +12,14 @@ import Hashtag from "Element/Hashtag";
import Tag from "Nostr/Tag";
import { MetadataCache } from "Db/User";
import Mention from "Element/Mention";
+import TidalEmbed from "Element/TidalEmbed";
function transformHttpLink(a: string) {
try {
const url = new URL(a);
const youtubeId = YoutubeUrlRegex.test(a) && RegExp.$1;
const tweetId = TweetUrlRegex.test(a) && RegExp.$2;
+ const tidalId = TidalRegex.test(a) && RegExp.$1;
const extension = FileExtensionRegex.test(url.pathname.toLowerCase()) && RegExp.$1;
if (extension) {
switch (extension) {
@@ -61,6 +63,8 @@ function transformHttpLink(a: string) {
>
)
+ } else if (tidalId) {
+ return