AdguardTeam / AdguardTeam/Scriptlets

Fix 'json-prune' — scriptlet does not work on Twitter

Đang mở
#321 6 bình luận 0 reaction 1 người được giao Được giao cho @maximtop Xem trên GitHub
bug Priority: P4
Ngôn ngữ chính
JavaScript
Star
195
Fork
33
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Recently, Twitter has added ads to the section `Trends for you`:
![image](https://github.com/AdguardTeam/Scriptlets/assets/20223064/2d840674-2f54-4324-bd5f-dabbcc44c806)
After checking with the Chrome DevTools, I found these requests called on the Request URL: https://twitter.com/i/api/2/guide.json
P/s: I did not write the query string paramters because it was quite long.
And this is the position of advertising objects:
![image](https://github.com/AdguardTeam/Scriptlets/assets/20223064/e3b41214-79cb-45aa-8493-ac991e38d40c)
I wrote the scriptlet rule as follows to remove the index element `1`:
`twitter.com#%#//scriptlet('json-prune', 'timeline.instructions[1].addEntries.entries[1].content.timelineModule.items[1]')`
I wrote the scriptlet rule as follows to remove the `entryId` property:
`twitter.com#%#//scriptlet('json-prune', 'timeline.instructions[1].addEntries.entries[1].content.timelineModule.items[1]').entryId`
I wrote the scriptlet rule as follows to remove the `item` property:
`twitter.com#%#//scriptlet('json-prune', 'timeline.instructions[1].addEntries.entries[1].content.timelineModule.items[1]').item`
But all of them are not working, the console window does not have any stack trace even though the `Filtering log` is still displayed.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.