Last active
August 1, 2019 17:34
-
-
Save troyk/c77f36b9dfca2e6264efd525ce6a86e6 to your computer and use it in GitHub Desktop.
filter HN who's hiring to golang, elixir and ruby
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
var gojobs = 0, elixirjobs = 0, rubyjobs = 0; | |
document.querySelectorAll('.athing.comtr').forEach(function(el){ | |
var text = el.innerText.toLowerCase(); | |
var show = false; | |
if (text.indexOf('golang')>0 || text.indexOf(', go ')>0 || text.indexOf(' go,')>0) { | |
gojobs++; show=true; | |
} | |
if (text.indexOf('elixir')>0) { | |
elixirjobs++; show=true; | |
} | |
if (text.indexOf('ruby')>0 || text.indexOf('rails')>0) { | |
rubyjobs++; show=true; | |
} | |
el.style.display= show ? '':'none'; | |
}); | |
console.log(gojobs,elixirjobs,rubyjobs); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment