Skip to content

Instantly share code, notes, and snippets.

@troyk
Last active August 1, 2019 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save troyk/c77f36b9dfca2e6264efd525ce6a86e6 to your computer and use it in GitHub Desktop.
Save troyk/c77f36b9dfca2e6264efd525ce6a86e6 to your computer and use it in GitHub Desktop.
filter HN who's hiring to golang, elixir and ruby
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