()
| 667 | |
| 668 | function blockUsers_search() { |
| 669 | function blockUsers_now() { |
| 670 | if (location.search.indexOf('type=content') === -1) return // 目前只支持搜索页的 [综合] |
| 671 | document.querySelectorAll('.Card.SearchResult-Card[data-za-detail-view-path-module="AnswerItem"], .Card.SearchResult-Card[data-za-detail-view-path-module="PostItem"]').forEach(function(item1){ |
| 672 | let item = item1.querySelector('.RichText.ztext.CopyrightRichText-richText b'); // 用户名所在元素 |
| 673 | if (item) { |
| 674 | for (const keyword of menu_value('menu_customBlockUsers')) { // 遍历用户名黑名单 |
| 675 | if (keyword != '' && item.textContent === keyword) { // 找到就删除该信息流 |
| 676 | console.log('已屏蔽:' + item.textContent); |
| 677 | item1.hidden = true; |
| 678 | break; |
| 679 | } |
| 680 | } |
| 681 | } |
| 682 | }) |
| 683 | } |
| 684 | |
| 685 | setTimeout(blockUsers_now, 2000); |
| 686 | window.addEventListener('urlchange', function(){ |
nothing calls this directly
no test coverage detected