MCPcopy Index your code
hub / github.com/XIU2/UserScript / customBlockUsers

Function customBlockUsers

Zhihu-Enhanced.user.js:518–530  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

516
517// 自定义屏蔽用户
518function customBlockUsers() {
519 let nowBlockUsers = '';
520 menu_value('menu_customBlockUsers').forEach(function(item){nowBlockUsers += '|' + item})
521 //console.log(nowBlockUsers.replace('|',''))
522 let newBlockUsers = prompt('编辑 [自定义屏蔽用户]\n(不同用户名之间使用 "|" 分隔,例如:用户A|用户B|用户C )', nowBlockUsers.replace('|',''));
523 if (newBlockUsers === '') {
524 GM_setValue('menu_customBlockUsers', []);
525 registerMenuCommand(); // 重新注册脚本菜单
526 } else if (newBlockUsers != null) {
527 GM_setValue('menu_customBlockUsers', newBlockUsers.split('|'));
528 registerMenuCommand(); // 重新注册脚本菜单
529 }
530};
531
532
533// 屏蔽指定用户

Callers 1

registerMenuCommandFunction · 0.70

Calls 2

menu_valueFunction · 0.70
registerMenuCommandFunction · 0.70

Tested by

no test coverage detected