From bb9ab15e41110505604a7b4328592adc4a137e9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Thu, 18 Apr 2024 14:45:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E8=B0=83=E6=95=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- github/monkey.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/github/monkey.js b/github/monkey.js index 331037a..5d092a2 100644 --- a/github/monkey.js +++ b/github/monkey.js @@ -15,22 +15,16 @@ document.addEventListener("DOMContentLoaded", () => { // 配置信息 const config = {}; - // 获取配置 - const GM_getValue = (key) => { - return config[key] - }; - // 设置配置 - const GM_setValue = (key, newValue) => { - const oldValue = config[key]; - config[key] = newValue; - return oldValue; - }; // 注册菜单命令,并返回menuCommandId const GM_registerMenuCommand = (name, callback, accessKey) => {}; // 注销菜单命令 const GM_unregisterMenuCommand = (menuCommandId) => {}; // 在tab中打开url const GM_openInTab = (url, options) => {}; + // 获取配置 + const GM_getValue = (key) => config[key]; + // 设置配置 + const GM_setValue = (key, value) => { config[key] = value; }; // 消息通知 const GM_notification = (options) => {};