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

Function menu_switch

DuckDuckGo-Enhanced.user.js:53–56  ·  view source on GitHub ↗
(Status, Name, Tips)

Source from the content-addressed store, hash-verified

51
52 // 菜单开关
53 function menu_switch(Status, Name, Tips) {
54 if (Status == true) {GM_setValue(Name, false); GM_notification({text: `已关闭 [${Tips}] 功能\n(点击刷新网页后生效)`, timeout: 3500, onclick: function(){location.reload();}});} else {GM_setValue(Name, true); GM_notification({text: `已开启 [${Tips}] 功能\n(点击刷新网页后生效)`, timeout: 3500, onclick: function(){location.reload();}});}
55 registerMenuCommand();
56 };
57
58
59 document.documentElement.appendChild(document.createElement('style')).textContent = `

Callers 1

registerMenuCommandFunction · 0.70

Calls 1

registerMenuCommandFunction · 0.70

Tested by

no test coverage detected