From 580c4111428ce7c1f4f1e9b344b43256fc758ed5 Mon Sep 17 00:00:00 2001 From: manchuwork Date: Fri, 12 Dec 2025 04:22:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=8D=E5=88=B6=E6=BA=90?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script2-1-qcc-acq.js | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/script2-1-qcc-acq.js b/script2-1-qcc-acq.js index bbdcf11..42cf5a4 100644 --- a/script2-1-qcc-acq.js +++ b/script2-1-qcc-acq.js @@ -8,7 +8,8 @@ // @match https://aiqicha.baidu.com/company_detail_* // @match https://www.tianyancha.com/company/* // @match https://shiming.gsxt.gov.cn/* -// @grant none +// @grant GM_setClipboard +// @run-at document-start // ==/UserScript== (function () { @@ -1177,19 +1178,9 @@ class TianYanChaParser { // 复制源码按钮 const copySourceButton = createButton("复制源码", () => { - const html = document.documentElement.outerHTML; - - copyToClipboard(html, "HTML源码已复制到剪贴板"); - /* - navigator.clipboard - .writeText(html) - .then(() => { - alert("源码已复制到剪贴板"); - }) - .catch((err) => { - console.error("复制失败:", err); - }); - */ + const html = document.documentElement.outerHTML; + GM_setClipboard(html, 'text'); + ToolUtils.showAutoCloseMessage("源码已复制到剪贴板", "success") }); // 解析公司信息按钮