MCPcopy Create free account
hub / github.com/app2smile/rules / removeThread

Function removeThread

js/tieba-proto.js:212–232  ·  view source on GitHub ↗
(threadList, filterVideo)

Source from the content-addressed store, hash-verified

210}
211
212function removeThread(threadList, filterVideo) {
213 let newThreadList = threadList;
214 let liveCount = 0;
215 let videoCount = 0;
216 if(threadList?.length){
217 newThreadList = threadList.filter(item => {
218 if(item.alaInfo){
219 liveCount++;
220 return false;
221 } else if(filterVideo && item.videoInfo){
222 videoCount++;
223 return false;
224 }
225 return true;
226 });
227 console.log(`去除帖子:直播${liveCount} / 视频${videoCount}`)
228 } else {
229 console.log('无需处理threadList');
230 }
231 return newThreadList;
232}

Callers 1

tieba-proto.jsFile · 0.85

Calls 1

logMethod · 0.45

Tested by

no test coverage detected