Created
June 12, 2018 04:44
-
-
Save GiancarloGomez/f26e057a5385b8090cd6cf4d3ba3e261 to your computer and use it in GitHub Desktop.
Netflix History Delete
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
let _year = new Date().getYear()-100; | |
let _regex = new RegExp(`/${_year}$`); | |
document.querySelectorAll('.retableRow').forEach(a => { | |
let _date = a.querySelector('.date'); | |
if( !_regex.test(_date.innerText) ) | |
a.querySelector('.deleteBtn').click() | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment