Skip to content

Instantly share code, notes, and snippets.

View vitogit's full-sized avatar

vitogit (Alvaro) vitogit

View GitHub Profile
@vitogit
vitogit / hn_seach_input_filter.js
Last active February 1, 2018 23:35 — forked from kristopolous/hn_seach.js
Add an input search to filter comments from Hacker News
/*Copy this code to the console in HN and it will show a Search filter that you can use to filter the posts from HN*/
function query() {
var
// HN is done with very unsemantic classes.
job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')),
query_list = Array.prototype.slice.call(arguments),
shown = 0, total = job_list.length;
// Traverses up the dom stack trying to find a match of a specific class