This Safari bookmarklet lets you search the Hacker News Who is Hiring thread using multiple search criteria.
-
On your iOS device, navigate to the lastest HN Who is Hiring thread (e.g. June 2016).
-
Tap the Save icon (then Add Bookmark > Change title to e.g. "HN search" > Save)
-
Now tap the icon (find the bookmark, hit Edit > click the bookmark, in the Address field, delete the contents and paste in the following:
javascript:void function(){var e=prompt("Enter keywords:").split(" "),t=document.getElementsByClassName("athing"),n=[];for(var r=0;r<t.length;r++){var i=0;for(var s=0;s<e.length;s++)t[r].innerText.toLowerCase().indexOf(e[s].toLowerCase())>-1&&i++;i==e.length&&n.push(t[r])}var o=function(e){e.onclick=function(){var t=n.indexOf(e),r=t+1,i=n[r];i.scrollIntoView()}};for(var r=0;r<n.length;r++)n[r].style.backgroundColor="orange",o(n[r]);n[0].scrollIntoView()}();
-
Tap Done 3 times to save and exit.
-
To start a search, tap the icon, and select HN search (or whatever you named the bookmark).
-
A prompt will appear and you can type in your space-dlimited search terms (e.g. "Javascript react"), click Ok to search.
-
To go to the next search result, tap the current highlighted result. To start a new search, reload the page and repeat from Step 5.
-
Clone the repo:
git clone https://github.com/guarani/HN-iOS-Bookmarklet-Who-is-Hiring-Search hn-bookmarklet
-
Go to the repo:
cd hn-bookmarklet
-
Make changes to
hn.js
-
The contents of
hn.js
must be first prepended withjavascript:
before being copied to an iOS bookmark -
Alternatively, if you have UglifyJS installed, run the following command to take
hn.js
, minify it, and prepend thejavascript:
string, and place the result inhn.min.js
:var=$(uglifyjs hn.js); echo "javascript:"${var/void\ /void } > hn.min.js
-
Pull requests welcome!