Advertisement
Guest User

Make a new tab forever

a guest
Feb 22nd, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. var i = 1; // set your counter to 1
  2.  
  3. function myLoop () { // create a loop function
  4. setTimeout(function () { // call a 30 millisecond setTimeout when the loop is called
  5. window.open(); // your code here
  6. i++; // increment the counter
  7. if (i < 1000000000) { // if the counter < 1000000000, call the loop function
  8. myLoop(); // .. again which will trigger another
  9. } // .. setTimeout()
  10. }, 30)
  11. }
  12.  
  13. myLoop();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement