From e6de46809ff7f5c34d6b45cdef8f756cbcc49cb6 Mon Sep 17 00:00:00 2001 From: luke Date: Fri, 20 Jun 2025 01:23:44 +0800 Subject: [PATCH] fix --- scripts/popup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/popup.js b/scripts/popup.js index 35852a3..5378f54 100644 --- a/scripts/popup.js +++ b/scripts/popup.js @@ -177,10 +177,10 @@ document.addEventListener("DOMContentLoaded", async () => { results.forEach(doc => { const li = document.createElement("li"); const filename = doc.filename || doc.title || "未知文件"; - const filepath = doc.filepath?.replace(/^import-data\//, "").replace(/\.md$/, ".html") || ""; + const url = doc.url || ""; const mtime = doc.mtime ? formatLocalTime(doc.mtime) : ""; // 格式化时间 const link = document.createElement("a"); - link.href = `${fileBaseUrl}/${filepath || filename}`; + link.href = `${url}`; link.target = "_blank"; link.textContent = filename;