Skip to content

Instantly share code, notes, and snippets.

@komkanit
Last active April 24, 2019 05:09
Show Gist options
  • Save komkanit/8784ead4d5fa2088cab351f18926db3d to your computer and use it in GitHub Desktop.
Save komkanit/8784ead4d5fa2088cab351f18926db3d to your computer and use it in GitHub Desktop.
REMOVE AVENGER SPOILER. copy this code and paste in console on your browser
var banList = ['avenger', 'infinity'];
setInterval(function() {
var a = document.querySelectorAll('[role="article"]')
a.forEach((d) => {
banList.map((text) => {
if (d.innerText.toLocaleLowerCase().indexOf(text) >= 0) {
console.log('removed');
d.remove()
}
})
})
}, 2000)
@iammarkps
Copy link

const banList = ['avenger', 'infinity', 'endgame'];
const rule = new RegExp(banList.join('|'),'i')
setInterval(function() {  
  Array.from(document.querySelectorAll('[role="article"]'))
    .filter(d => rule.test(d.innerText))
    .forEach(d => d.remove())
}, 2000)

Add endgame krub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment