(menu_status, Name, Tips)
| 64 | } |
| 65 | // 菜单开关 |
| 66 | function menu_switch(menu_status, Name, Tips) { |
| 67 | if (menu_status == 'true') { |
| 68 | GM_setValue(`${Name}`, false); |
| 69 | GM_notification({ text: `已关闭 [${Tips}] 功能\n(点击刷新网页后生效)`, timeout: 3500, onclick: function () { location.reload(); } }); |
| 70 | } else { |
| 71 | GM_setValue(`${Name}`, true); |
| 72 | GM_notification({ text: `已开启 [${Tips}] 功能\n(点击刷新网页后生效)`, timeout: 3500, onclick: function () { location.reload(); } }); |
| 73 | } |
| 74 | registerMenuCommand(); // 重新注册脚本菜单 |
| 75 | }; |
| 76 | // 返回菜单值 |
| 77 | function menu_value(menuName) { |
| 78 | for (let menu of menu_ALL) { |
no test coverage detected