I'm trying to write an userscript for a forum wherein, I require it to navigate to different URLs randomly.
The basic idea is, I want to be online most of the time to increment my online spent time. The forum will not increment to online spent time after some time of inactivity(Let's assume 5 mins).
So, how can I write a javascript code to keep navigating to different URLs within the forum.
This is the format of forum threads : somesite.xxx/showthread.php?tid=xxxxxxx So the script should visit some random thread (say 0123456), wait for 5 mins and visit next random thread (say 1123456) and keep this loop repeating.
I tried this :
setTimeout(function() {
location.href = "somesite.xxx/showthread.php?tid=4128749";
}, 10000);
setTimeout(function() {
location.href = "somesite.xxx/showthread.php?tid=5128749";
}, 10000);
setTimeout(function() {
location.href = "somesite.xxx/showthread.php?tid=3128749";
}, 10000);
But I cannot keep adding all the countless URLs and also the above code isn't working, keeps appending the site URL like somesite.xxx/somesite.xxx/...
window.location.replace("http://stackoverflow.com");// similar behavior as clicking on a linkwindow.location.href = "http://stackoverflow.com";But I cannot keep adding all the countless URLsget a list from some server somewhere