Show HN: Chrome Extension to Filter HN Stories by Keyword
github.com
github.com
I made this because I'm tired of seeing political flame-stories on here and I hate flagging them or, even worse, going in the threads to complain about them.
With this extension you can make a comma-separated list of words that when matched within a headline, the link is removed from the page before you ever see it.
You can check the console to see what stories are being removed. It's open source so feel free to fork, customize, contribute or whatever.
It can be used to filter anything, so if you can't stand to see another "JavaScript" or "Python" story, you can block those too.
> It's open source so feel free to fork, customize, contribute or whatever.
Could you add a license to the repo then?
if(thisText.indexOf(thisWord) > -1)
You can just do: if ( thisText.includes(thisWord) )
Likewise... for(let i = 0; i < entries.length; i++){
Can be replaced with: entries.forEach(function(entry, index){
Chrome supports both the relevant parts of ES6 and ES5 out of the box.Also old-style for loops in JS fall victim to the last entry effect since people often use them to set up event handlers and wonder why they don't work.
[1] https://chrome.google.com/webstore/detail/hackybird/ddlhmpom...
https://chrome.google.com/webstore/detail/hackybird/ddlhmpom...
Example: "New CIA Chief to Gladly Spy on Americans, Even If Using Info Hacked by Russians" looks like opinionism that I could pretty well live without, but it doesn't contain any keywords I would blacklist.
For technical stuff it's probably a lot easier (just name the language/framework/etc).
Although filtering out comments could be a feature and not a bug, amiright?