Skip to content

Commit

Permalink
feat(clear ads): add clear ads function for some site.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellipse120 committed Apr 8, 2024
1 parent cd94918 commit 8e3d40f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions note.md
Original file line number Diff line number Diff line change
Expand Up @@ -4544,3 +4544,25 @@ user.details.age = 25
```
---
## 162. Clear `Vidhub` ads in client only.
```js
const clearAds = () => {
const divz = document.getElementsByTagName('DIVZ')
const ads = [...document.querySelectorAll('div')].filter(
(s) => s.id.includes('left') || s.id.includes('right')
)
const ad2 = document.getElementsByClassName('adpcc')

;[...divz, ...ad2, ...ads].forEach((el) => {
el?.remove()
})
}

setTimeout(() => {
clearAds()
}, 5000)
```
---

0 comments on commit 8e3d40f

Please sign in to comment.