popup细节
Some checks failed
test / Run tests (push) Failing after 3s
build / Build (push) Failing after 5s
Some checks failed
test / Run tests (push) Failing after 3s
build / Build (push) Failing after 5s
This commit is contained in:
@ -9,8 +9,20 @@
|
||||
// @grant GM_unregisterMenuCommand
|
||||
// ==/UserScript==
|
||||
|
||||
|
||||
const id = GM_registerMenuCommand("测试菜单", () => {
|
||||
const id = GM_registerMenuCommand(
|
||||
"测试菜单",
|
||||
() => {
|
||||
console.log(id);
|
||||
GM_unregisterMenuCommand(id);
|
||||
}, "h");
|
||||
},
|
||||
"h"
|
||||
);
|
||||
|
||||
const id2 = GM_registerMenuCommand(
|
||||
"测试菜单2",
|
||||
() => {
|
||||
console.log(id2);
|
||||
GM_unregisterMenuCommand(id2);
|
||||
},
|
||||
"j"
|
||||
);
|
||||
|
Reference in New Issue
Block a user