修改复制源码

This commit is contained in:
manchuwork
2025-12-12 04:22:40 +08:00
parent c813f29f85
commit 580c411142

View File

@@ -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 () {
@@ -1178,18 +1179,8 @@ class TianYanChaParser {
// 复制源码按钮
const copySourceButton = createButton("复制源码", () => {
const html = document.documentElement.outerHTML;
copyToClipboard(html, "HTML源码已复制到剪贴板");
/*
navigator.clipboard
.writeText(html)
.then(() => {
alert("源码已复制到剪贴板");
})
.catch((err) => {
console.error("复制失败:", err);
});
*/
GM_setClipboard(html, 'text');
ToolUtils.showAutoCloseMessage("源码已复制到剪贴板", "success")
});
// 解析公司信息按钮