I have a tampermonkey script that runs on a video play list. It should run on each playlist I click on, but it only runs on the first playlist and I have to close chrome and repopen it to get it to work on a new playlist.
var playlistmax = document.querySelectorAll('.PlaylistVideo').length;
var i = 1;
setInterval( function () {
document.getElementsByClassName('PlaylistVideo')[i].click();
alert ("I is : " + i);
i++;
}, 42000);
On the first play list the alert popup and tells me I (what video it's on). But after the first playlist I get no alerts.
Thanks for any help