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

Function menu_customTime

DarkMode.user.js:209–218  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

207
208 // 自定义昼夜时间
209 function menu_customTime() {
210 let newMods = prompt('自定义脚本内和白天/晚上相关的时间,修改后刷新网页生效~\n格式:6:00|18:30 (即 6:00 ~ 18:30 之间是白天时间)\n也支持反向设置:14:00|12:00 (即 12:00 ~ 14:00 之间是夜晚时间)', GM_getValue('menu_customTime'));
211 if (newMods === '') {
212 GM_setValue('menu_customTime', '6:00|18:00');
213 registerMenuCommand(); // 重新注册脚本菜单
214 } else if (newMods != null) {
215 GM_setValue('menu_customTime', newMods);
216 registerMenuCommand(); // 重新注册脚本菜单
217 }
218 }
219
220
221 // 强制当前网站启用护眼模式

Callers 1

registerMenuCommandFunction · 0.85

Calls 1

registerMenuCommandFunction · 0.70

Tested by

no test coverage detected