From a325f1b571e1a3e017ba68004b1b538952c389fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Fri, 27 Sep 2024 14:27:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20tampermonkey.js=20?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E7=A9=BA=E6=8C=87=E9=92=88=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tampermonkey.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tampermonkey.js b/tampermonkey.js index aba06b8..67a2488 100644 --- a/tampermonkey.js +++ b/tampermonkey.js @@ -389,7 +389,7 @@ // 注册菜单 api.GM_registerMenuCommand = (name, callback, options_or_accessKey) => { - const options = typeof options_or_accessKey === "string" ? { accessKey: options_or_accessKey } : options_or_accessKey; + const options = typeof options_or_accessKey === "string" ? { accessKey: options_or_accessKey } : (options_or_accessKey || {}); // 生成菜单ID let menuCmdId;