Skip to content

Instantly share code, notes, and snippets.

@zwhitchcox
Last active November 26, 2016 03:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zwhitchcox/ad04d1d0b0cf603ca8329fcdb6c26a54 to your computer and use it in GitHub Desktop.
Save zwhitchcox/ad04d1d0b0cf603ca8329fcdb6c26a54 to your computer and use it in GitHub Desktop.
Filter HBO Now by Release Date
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