Skip to content

Instantly share code, notes, and snippets.

@dennyabrain
Created September 27, 2022 10:58
Show Gist options
  • Save dennyabrain/a8c4c2c4d792529feeac07e359a32848 to your computer and use it in GitHub Desktop.
Save dennyabrain/a8c4c2c4d792529feeac07e359a32848 to your computer and use it in GitHub Desktop.
Remixing your online experience
document
.querySelectorAll('[data-testid="tweetText"]')
.forEach((i)=>{
console.log(i)
if(i.innerText.indexOf("HouseOfTheDragon")!=-1){
i.parentElement.parentElement.parentElement.remove()
}
})
var searchedList = []
function isNotEmpty(term){
return term.length!=0
}
function searchOnUrbanDictionary(term){
window.open(`https://www.urbandictionary.com/define.php?term=${term}`, '_blank')
}
function main(){
setInterval(()=>{
let term = window.getSelection().toString()
if(term.length===0){
return
}
if(!searchedList.includes(term)){
console.log(`searching for ${term}`)
searchedList.push(term)
searchOnUrbanDictionary(term)
}
}, 200)
}
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment