From 6e5d28e52e33c858f922569e07e75afa12589faf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20Kadir=20Ak=C4=B1n?= Date: Mon, 16 Jun 2025 16:13:35 +0300 Subject: [PATCH] add embedding --- _site/embed-preview-script.js | 4 ++++ embed-preview-script.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/_site/embed-preview-script.js b/_site/embed-preview-script.js index f2ea30d..43baad7 100644 --- a/_site/embed-preview-script.js +++ b/_site/embed-preview-script.js @@ -213,6 +213,10 @@ class EmbedPreview { if (context.startsWith('@')) { // @mentions - just show the text pill.innerHTML = '' + context + ''; + } else if (context.startsWith('http://') || context.startsWith('https://')) { + // Web URLs show world icon + icon = ''; + pill.innerHTML = icon + '' + context + ''; } else if (context.startsWith('#')) { // Any hashtag context shows image icon icon = ''; diff --git a/embed-preview-script.js b/embed-preview-script.js index f2ea30d..43baad7 100644 --- a/embed-preview-script.js +++ b/embed-preview-script.js @@ -213,6 +213,10 @@ class EmbedPreview { if (context.startsWith('@')) { // @mentions - just show the text pill.innerHTML = '' + context + ''; + } else if (context.startsWith('http://') || context.startsWith('https://')) { + // Web URLs show world icon + icon = ''; + pill.innerHTML = icon + '' + context + ''; } else if (context.startsWith('#')) { // Any hashtag context shows image icon icon = '';