Created
November 5, 2015 23:47
-
-
Save makaroni4/8d0d03b10f3495d7620e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
function hideBoringArticles(nodes) { | |
nodes.filter("article.badge-entry-container.badge-entry-entity").each(function(i, el) { | |
if($(el).data("entryVotes") < 20000) { | |
$(el).hide(); | |
} | |
}) | |
} | |
var MutationObserver = window.MutationObserver; | |
var observer = new MutationObserver(function(mutations) { | |
mutations.forEach(function(mutation) { | |
var $nodes = $(mutation.addedNodes); | |
hideBoringArticles($nodes); | |
}); | |
}); | |
var articleList = document.querySelector(".badge-entry-collection") | |
var $currentArticles = $(articleList).find("article.badge-entry-container.badge-entry-entity"); | |
hideBoringArticles($currentArticles); | |
observer.observe(articleList, { | |
childList: true | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah :D! Very nice man!