Created
February 3, 2024 03:26
-
-
Save jdc-cunningham/50b37caeac27900f5a4e1ff2c3c70b63 to your computer and use it in GitHub Desktop.
Hacker News dev tools console job highlighter
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('.athing.comtr').forEach(job => { | |
const jobText = job.innerText.toLowerCase(); | |
const rejectWords = ['europe', 'staff', 'sr.', 'senior', 'lead', 'principal', 'uk', 'spain', 'portugal', 'netherlands', 'berlin', 'germany', 'devops', 'eu', 'platform', 'onsite', 'hybrid']; | |
const wantWords = ['react', 'javascript', 'python', 'rails', 'node']; | |
const wanted = wantWords.some(word => jobText.includes(word)); | |
if (wanted) { | |
const rejected = rejectWords.some(word => jobText.includes(word)); | |
if (!rejected) { | |
job.style.backgroundColor = 'rgb(0, 255, 0, 0.3)'; | |
} else { | |
job.remove(); | |
} | |
} else { | |
job.remove(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this one removes the comments without want words