()
| 560 | function blockUsers_(className1, className2) { |
| 561 | // 前几条因为是直接加载的,而不是动态插入网页的,所以需要单独判断 |
| 562 | function blockKeywords_now() { |
| 563 | document.querySelectorAll(className1).forEach(function(item1){ |
| 564 | let item = item1.querySelector('.ContentItem.AnswerItem, .ContentItem.ArticleItem'); // 用户名所在元素 |
| 565 | if (item) { |
| 566 | for (const keyword of menu_value('menu_customBlockUsers')) { // 遍历用户名黑名单 |
| 567 | if (keyword != '' && item.dataset.zop.indexOf('authorName":"' + keyword + '",') > -1) { // 找到就删除该信息流 |
| 568 | console.log('已屏蔽:' + item.dataset.zop); |
| 569 | item1.hidden = true; |
| 570 | break; |
| 571 | } |
| 572 | } |
| 573 | } |
| 574 | }) |
| 575 | } |
| 576 | |
| 577 | blockKeywords_now(); |
| 578 | window.addEventListener('urlchange', function(){ |
no test coverage detected