Store your window.open calls into a variable like:
var a = window.open(/*url...*/);
Once that window has closed, it’s closed
property will be true. Just set up a setInterval() to check every second or so to check if it’s closed then open a new window. This question has your answer for you. Something like the following could work:
var a = window.open("urla");
setInterval(function(){if (a.closed) {window.open("urlb");}}, 1000);
If you want to open 100 links, you could make a for loop that opens each link individually:
for (var a = 100; a < 200; a++) { window.open("http://example.com/t" + a + ".php"); }
^ will open links from 100 to 199.
solved Javascript to open URLs at after a delay