0

I can't find anything that meets my needs here but hopefully someone will have a simple answer.

I want my browser to load pages one after the other, i.e. www.sitename.com/page 0405, then www.sitename.com/page 0406 etc, with a variable interval.

I don't need it to do anything other than the above. I just want it to visit each sequentially-numbered page in succession.

Brock Adams
  • 90,639
  • 22
  • 233
  • 295
eoghie
  • 9
  • 2
  • See, also, ["How to open a list of pages automatically and sequentially?"](http://stackoverflow.com/q/12260455/331508). – Brock Adams Apr 26 '15 at 05:51
  • The url you marked it as duplicate of (your own answer) is not really the same. – Sidd Apr 26 '15 at 06:09
  • I'll admit that I know nothing about scripts, but the "Greasemonkey fetch values" suggestion seems to have nothing to do with what I've asked. – eoghie Apr 26 '15 at 07:18
  • Unfortunately I don't know enough to know if there's elements I can use from that script. I just wanted a little package that I could set the parameters for, and let it run. – eoghie Apr 26 '15 at 07:19
  • @eoghie, try this: http://pastebin.com/ujPX0h5V - create a new html page with this script in its body, set the variables as per your requirements, and visit the page you just created. Should open all your pages in tabs. – Sidd Apr 26 '15 at 07:28
  • @Sidd I think this is perfect - first try and it worked exactly as I hoped - thanks so much for this. Can I give a +1 somewhere for your help? – eoghie Apr 26 '15 at 21:03

1 Answers1

1

onload is triggered when an element loads. Just put an iframe and load the next page every time onload triggers.

var i = 0
var iframe = document.querySelector('iframe')
iframe.onload = function() {
  iframe.src = 'http://www.sitename.com/page'+i
  i++
}
iframe.onload()
Farzher
  • 13,934
  • 21
  • 69
  • 100