Last active
November 26, 2016 03:37
-
-
Save zwhitchcox/ad04d1d0b0cf603ca8329fcdb6c26a54 to your computer and use it in GitHub Desktop.
Filter HBO Now by Release Date
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
var ul = document.getElementsByClassName('thumbs')[0] | |
var toDelete = [] | |
for (var i = 0; i < ul.children.length; i++) { | |
var releaseDate = ul.children[i].getElementsByClassName('now-thumbnail')[0].getAttribute('data-releasedate') | |
if (+releaseDate < 2000) toDelete.push(ul.children[i]) | |
} | |
toDelete.forEach(function (el) {el.parentNode.removeChild(el)}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment