JSFiddle - React, Tailwind, and code Playground
by oduska
HTML
<div class="thing">
<div class="entry">
<p class="tagline">submitted <time title="Wed May 11 11:18:46 2016 UTC" datetime="2016-05-11T11:18:46+00:00" class="live-timestamp">4 hours ago</time> by <a href="https://www.reddit.com/user/ohohpopo" class="author may-blank id-t2_qz9er userTagged">ohohpopo</a><span class="RESUserTag"><a class="userTagLink RESUserTagImage" username="ohohpopo" title="set a tag" href="javascript:void 0"></a></span> <a href="#" class="voteWeight" style="display: none;">[vw]</a><span class="userattrs"></span> to <a href="https://www.reddit.com/r/The_Donald/" class="subreddit hover may-blank">/r/HillaryForPresident</a></p>
<ul class="flat-list buttons">
<li>
<form class="hide-button">
<a href="#">Hide</a>
</form>
</li>
</ul>
</div>
</div>
<div class="thing">
<div class="entry">
<p class="tagline">submitted <time title="Wed May 11 11:18:46 2016 UTC" datetime="2016-05-11T11:18:46+00:00" class="live-timestamp">4 hours ago</time> by <a href="https://www.reddit.com/user/ohohpopo" class="author may-blank id-t2_qz9er userTagged">ohohpopo</a><span class="RESUserTag"><a class="userTagLink RESUserTagImage" username="ohohpopo" title="set a tag" href="javascript:void 0"></a></span> <a href="#" class="voteWeight" style="display: none;">[vw]</a><span class="userattrs"></span> to <a href="https://www.reddit.com/r/The_Donald/" class="subreddit hover may-blank">/r/leagueoflegends</a></p>
<ul class="flat-list buttons">
<li>
<form class="hide-button">
<a href="#">Hide</a>
</form>
</li>
</ul>
</div>
</div>
<div class="thing">
<div class="entry">
<p class="tagline">submitted <time title="Wed May 11 11:18:46 2016 UTC" datetime="2016-05-11T11:18:46+00:00" class="live-timestamp">4 hours ago</time> by <a...
CSS
.red {
background-color: red;
}
JavaScript
$(function() {
var subredditLink = $('.subreddit');
var annoyingSubreddits = [
'/r/The_Donald',
'/r/SandersForPresident',
'/r/leagueoflegends',
'/r/politics'
];
$(subredditLink).each(function() {
var match = $.inArray($(this).text(), annoyingSubreddits);
if (match !== -1){
$(this).closest('.thing').find('.hide-button a').addClass('red');
}
});
});