Rules-For-Quantumult-X/Scripts/AdBlock/Zhihu/Recommend.js

9 lines
270 B
JavaScript

let body = $response.body
body = JSON.parse(body)
body['data'].forEach((element, index) => {
if (element['card_type'] === 'slot_event_card' || element.hasOwnProperty('ad')) {
body['data'].splice(index, 1)
}
})
body = JSON.stringify(body)
$done({body})