From 3193e8a00f114826ef231f0f41296b0abfbfbc7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Wed, 24 Apr 2024 10:48:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tampermonkey.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tampermonkey.js b/tampermonkey.js index 6e1f4fc3..2511449b 100644 --- a/tampermonkey.js +++ b/tampermonkey.js @@ -159,7 +159,7 @@ // 创建插件div api.createPluginDiv = (options) => { options = { - ...{ name: "油猴脚本" }, + ...{ name: "未知名的脚本" }, ...options } @@ -223,14 +223,14 @@ // 隐藏插件 api.hidePlugin = () => { if (context.pluginElement) { - context.pluginElement.style.display = "none"; + context.pluginElement.classList.add("____ds-tampermonkey-hide___"); } } // 显示插件 api.showPlugin = () => { if (context.pluginElement) { - context.pluginElement.style.display = "block"; + context.pluginElement.classList.remove("____ds-tampermonkey-hide___"); } }