From f7e05a4869c65529ddc4188c7bd28bc278b52cab Mon Sep 17 00:00:00 2001 From: cyfung1031 <44498510+cyfung1031@users.noreply.github.com> Date: Mon, 25 May 2026 07:27:20 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E6=B2=A1=E6=9C=89=20s?= =?UTF-8?q?earch=20=E9=80=A0=E6=88=90=E7=9A=84template=20=E4=B8=8D?= =?UTF-8?q?=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/options/routes/script/ScriptEditor.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/options/routes/script/ScriptEditor.tsx b/src/pages/options/routes/script/ScriptEditor.tsx index 291484dd2..435527335 100644 --- a/src/pages/options/routes/script/ScriptEditor.tsx +++ b/src/pages/options/routes/script/ScriptEditor.tsx @@ -148,9 +148,9 @@ const emptyScript = async (template: string, hotKeys: any, target?: string) => { const pageUrl = result?.activeTabUrl?.url; if (pageUrl) { try { - const { protocol, pathname, hostname } = new URL(pageUrl); + const { protocol, pathname, hostname, search } = new URL(pageUrl); if (protocol && pathname && hostname) { - retUrl = `${protocol}//${hostname}${pathname}`; + retUrl = `${protocol}//${hostname}${pathname}${search.length > 1 ? search : ""}`; if (protocol === "http:" || protocol === "https:") { retIcon = `https://www.google.com/s2/favicons?sz=64&domain=${hostname}`; }