小调整。

scripts
王良 2024-04-24 11:39:52 +08:00
parent 83a48e3530
commit 033785c810
1 changed files with 4 additions and 4 deletions

View File

@ -239,10 +239,10 @@
// 绑定点击事件 // 绑定点击事件
context.arrowElement.onclick = () => { context.arrowElement.onclick = () => {
if (__ds_global__.getContext().pluginElement.classList.contains("___ds-tampermonkey-hide___")) { if (__ds_global__.getContext().pluginElement.classList.contains("___ds-tampermonkey-hide___")) {
__ds_global__.getContext().pluginElement.classList.remove("___ds-tampermonkey-hide___"); api.showPlugin();
api.initArrowTitle(false); api.initArrowTitle(false);
} else { } else {
__ds_global__.getContext().pluginElement.classList.add("___ds-tampermonkey-hide___"); api.hidePlugin();
api.initArrowTitle(true); api.initArrowTitle(true);
} }
} }
@ -266,16 +266,16 @@
api.hidePlugin = () => { api.hidePlugin = () => {
if (context.pluginElement) { if (context.pluginElement) {
context.pluginElement.classList.add("___ds-tampermonkey-hide___"); context.pluginElement.classList.add("___ds-tampermonkey-hide___");
api.GM_setValue("ds_hide", true);
} }
api.GM_setValue("ds_hide", true);
} }
// 显示插件 // 显示插件
api.showPlugin = () => { api.showPlugin = () => {
if (context.pluginElement) { if (context.pluginElement) {
context.pluginElement.classList.remove("___ds-tampermonkey-hide___"); context.pluginElement.classList.remove("___ds-tampermonkey-hide___");
api.GM_deleteValue("ds_hide");
} }
api.GM_deleteValue("ds_hide");
} }
// 显示用户菜单列表 // 显示用户菜单列表