MCPcopy Create free account
hub / github.com/XIU2/UserScript / menu_switch

Function menu_switch

GoogleTranslate-Beautification.user.js:46–55  ·  view source on GitHub ↗
(menu_status, Name, Tips)

Source from the content-addressed store, hash-verified

44
45 // 菜单开关
46 function menu_switch(menu_status, Name, Tips) {
47 if (menu_status){
48 GM_setValue(`${Name}`, false);
49 GM_notification(`已关闭 [${Tips}] 功能\n(刷新网页后生效)`);
50 }else{
51 GM_setValue(`${Name}`, true);
52 GM_notification(`已开启 [${Tips}] 功能\n(刷新网页后生效)`);
53 }
54 registerMenuCommand(); // 重新注册脚本菜单
55 };
56
57
58 // 添加样式

Callers 1

registerMenuCommandFunction · 0.70

Calls 1

registerMenuCommandFunction · 0.70

Tested by

no test coverage detected