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

Function blockLowCount_1

Zhihu-Enhanced.user.js:499–512  ·  view source on GitHub ↗
(item, menu, type)

Source from the content-addressed store, hash-verified

497
498
499 function blockLowCount_1(item, menu, type) {
500 if (GM_getValue(menu)) {
501 let item_ContentItem = item.querySelector('.ContentItem')
502 if (item_ContentItem && item_ContentItem.dataset.zaExtraModule) {
503 let item2 = JSON.parse(item_ContentItem.dataset.zaExtraModule);
504 //console.log(item2)
505 if (item2 && item2.card.content && Number(item2.card.content[type]) < Number(GM_getValue(menu))) {
506 console.log('已屏蔽' + (type === 'upvote_num' ? '低赞':'低评') + (item_ContentItem.classList.contains('AnswerItem') ? '回答':'文章') + ':', item2.card.content[type] + '<' + GM_getValue(menu), item);
507 item.hidden = true;
508 item.style.display = 'none';
509 }
510 }
511 }
512 }
513}
514
515

Callers 2

blockLowCount_nowFunction · 0.85
callbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected