From a5102abe46636734ac4d5cb563e4d0c6626bbe45 Mon Sep 17 00:00:00 2001 From: 0PandaDEV <70103896+0PandaDEV@users.noreply.github.com> Date: Mon, 26 Aug 2024 09:17:36 +1000 Subject: [PATCH] fixed favicon wrongly displaying for files --- app.vue | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/app.vue b/app.vue index f736871..4975ecb 100644 --- a/app.vue +++ b/app.vue @@ -5,7 +5,7 @@ spellcheck="false" class="search" type="text" placeholder="Type to filter entries...">
- +

Qopy

@@ -33,7 +33,7 @@ @click="selectItem(groupIndex, index)" :ref="el => { if (isSelected(groupIndex, index)) selectedElement = el as HTMLElement }"> Image - Favicon + Favicon Image ({{ item.dimensions || 'Loading...' }}) {{ truncateContent(item.content) }} @@ -225,13 +225,8 @@ const truncateContent = (content: string): string => { return content.length > maxChars ? content.slice(0, maxChars - 3) + '...' : content; }; -const isUrl = (str: string): boolean => { - try { - new URL(str); - return true; - } catch { - return false; - } +const hasFavicon = (str: string): boolean => { + return str.trim() !== ''; }; const isYoutubeWatchUrl = (url: string): boolean => {