迁移部分内容
Some checks failed
test / Run tests (push) Failing after 55s
build / Build (push) Failing after 1m18s
Some checks failed
test / Run tests (push) Failing after 55s
build / Build (push) Failing after 1m18s
This commit is contained in:
16
example/gm_menu.js
Normal file
16
example/gm_menu.js
Normal file
@ -0,0 +1,16 @@
|
||||
// ==UserScript==
|
||||
// @name gm menu
|
||||
// @namespace https://bbs.tampermonkey.net.cn/
|
||||
// @version 0.1.0
|
||||
// @description 创建菜单, 可以显示在右上角的插件弹出页和浏览器右键菜单中
|
||||
// @author You
|
||||
// @match https://bbs.tampermonkey.net.cn/
|
||||
// @grant GM_registerMenuCommand
|
||||
// @grant GM_unregisterMenuCommand
|
||||
// ==/UserScript==
|
||||
|
||||
|
||||
const id = GM_registerMenuCommand("测试菜单", () => {
|
||||
console.log(id);
|
||||
GM_unregisterMenuCommand(id);
|
||||
}, "h");
|
Reference in New Issue
Block a user