()
| 291 | } |
| 292 | // 自定义屏蔽关键词(帖子标题) |
| 293 | function customBlockKeywords() { |
| 294 | let nowBlockKeywords = ''; |
| 295 | GM_getValue('menu_customBlockKeywords').forEach(function (item) { nowBlockKeywords += '|' + item }) |
| 296 | let newBlockKeywords = prompt('编辑 [自定义屏蔽关键词],刷新网页后生效\n(不同关键词之间使用 "|" 分隔,\n(例如:助力|互助|互点,如果只有一个就不需要 "|" 了。', nowBlockKeywords.replace('|', '')); |
| 297 | if (newBlockKeywords === '') { |
| 298 | GM_setValue('menu_customBlockKeywords', []); |
| 299 | registerMenuCommand(); // 重新注册脚本菜单 |
| 300 | } else if (newBlockKeywords != null) { |
| 301 | GM_setValue('menu_customBlockKeywords', newBlockKeywords.split('|')); |
| 302 | registerMenuCommand(); // 重新注册脚本菜单 |
| 303 | } |
| 304 | }; |
| 305 | // 屏蔽关键词(帖子标题) |
| 306 | function blockKeywords() { |
| 307 | if (!menu_value('menu_customBlockKeywords') || menu_value('menu_customBlockKeywords').length < 1) return |
no test coverage detected