Created
June 5, 2020 19:28
-
-
Save jpoles1/1baf984bdc1f111d40ddedbcf3ffa2a9 to your computer and use it in GitHub Desktop.
Enter this into your JS console in your web browser on the OKCupid website in order to filter matches based on locale/match percentage.
This file contains 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(".usercard").forEach((cardElem) => { | |
let pctElem = cardElem.querySelector(".match-percentage"); | |
let localeElem = cardElem.querySelector(".userInfo-meta-location"); | |
//Remove matches < 85% compatibility | |
if(parseInt(pctElem.innerHTML.replace("%", "")) < 85) { | |
cardElem.style.display = "none"; | |
} | |
//Filter on locale | |
else if(!localeElem.innerHTML.includes(", NY")) { | |
cardElem.style.display = "none"; | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment