Created
September 27, 2022 10:58
-
-
Save dennyabrain/a8c4c2c4d792529feeac07e359a32848 to your computer and use it in GitHub Desktop.
Remixing your online experience
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document | |
.querySelectorAll('[data-testid="tweetText"]') | |
.forEach((i)=>{ | |
console.log(i) | |
if(i.innerText.indexOf("HouseOfTheDragon")!=-1){ | |
i.parentElement.parentElement.parentElement.remove() | |
} | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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