Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Please upvote all comments disclosing salary range. https://news.ycombinator.com/item?id=15601810

Ctrl/Cmd+F search: 0k



Also consider searching 5k


To be honest, that's a bit of a minor signal all its own I personally don't consider worth the effort.


I think Benford has you covered


This is a great idea. I wrote a little JS snippet to paste into your browser's console to do this automatically. It iterates through all comments and upvotes any with a salary range / salary in the job description. Happy to make edits if you find a post doesn't match and it should—or vice versa. Upvotes are limited to 1 every 2s.

    var r1 = /(\$|£|€|)\d+(k|K)/m
    var r2 = /\d+-\d+(k|K)/m
    var r3 = /\d+(k|K) EUR/m
    var candidates = [r1, r2, r3];
    var linkQueue = []
    var comments = document.getElementsByTagName("tr")
    for (var i in comments) {
        var comment = comments[i];

        if (comment.className && comment.className.indexOf("athing comtr") != -1) {
            for (var j in candidates) {
                if (comment.innerHTML.search(candidates[j]) != -1) {
                    var linkElements = comment.getElementsByTagName("a");
                    for (var k in linkElements) {
                        var link = linkElements[k]

                        if (link.id && link.id.startsWith("up_") && (!link.className || (link.className && link.className != "nosee"))) {
                            linkQueue.push(link);
                        }
                    }
                }
            }
        }
    }

    var identifier = setInterval(function() {
        var link = linkQueue.pop();
        if (link) {
            link.click();
            console.log(link);
        } else {
            clearInterval(identifier);
        }
    }, 2000);


Excellent script. It matches "401k" however, so it might be worth matching against "401k" specifically. Also, I would recommend to others to give the whole thread a once-over after running the script, as it seems I've upvoted a couple of companies that had a big stream of complaints, and personally I do not upvote ads with complaints, even if they do other things (i.e. salary range) right.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: