-
Notifications
You must be signed in to change notification settings - Fork 0
/
source.js
29 lines (28 loc) · 856 Bytes
/
source.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Twetch blocker
setInterval(() => {
var blockList = (localStorage.blockList || [])
var allTwetches = document.querySelectorAll('.MuiGrid-item')
allTwetches.forEach((twetch) => {
try {
if (blockList.includes(twetch.children[0].children[0].children[1].children[0].innerText)) {
twetch.style.display = 'none'
}
} catch (er) {
// ignore
}
try {
if (blockList.includes(twetch.children[0].children[1].children[0].children[0].innerText)) {
twetch.style.display = 'none'
}
} catch (er) {
// ignore
}
})
}, 1000)
var blockList = JSON.parse(localStorage.blockList || '[]')
try {
blockList.push(document.querySelector('.MuiGrid-item').children[0].children[2].children[0].innerText)
localStorage.setItem('blockList', JSON.stringify(blockList))
} catch (er) {
console.log(er)
}