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

Function customBlockKeywords

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

Source from the content-addressed store, hash-verified

902
903// 自定义屏蔽关键词(标题)
904function customBlockKeywords() {
905 let nowBlockKeywords = '';
906 menu_value('menu_customBlockKeywords').forEach(function(item){nowBlockKeywords += '|' + item})
907 let newBlockKeywords = prompt('编辑 [自定义屏蔽关键词]\n(不同关键词之间使用 "|" 分隔,例如:关键词A|关键词B|关键词C \n(关键词不区分大小写,支持表情如:[捂脸]|[飙泪笑]', nowBlockKeywords.replace('|',''));
908 if (newBlockKeywords === '') {
909 GM_setValue('menu_customBlockKeywords', []);
910 registerMenuCommand(); // 重新注册脚本菜单
911 } else if (newBlockKeywords != null) {
912 GM_setValue('menu_customBlockKeywords', newBlockKeywords.split('|'));
913 registerMenuCommand(); // 重新注册脚本菜单
914 }
915};
916
917
918// 屏蔽指定关键词

Callers 1

registerMenuCommandFunction · 0.70

Calls 2

menu_valueFunction · 0.70
registerMenuCommandFunction · 0.70

Tested by

no test coverage detected