Ludwig von Drake
Newbie
- Jun 19, 2014
- 4
- 0
Hi everyone. I'm new to this, so sorry if this question could seem trivial.
Let's suppose using browser console to run this loop on a random tab:
After first reload, console instructions get nulled, and the loop can't continue. This should be normal.
Now, as title says, I was just wondering if there is a way to execute externally a script by console, and keep it running when page changes - maybe after a form is filled and submitted. I have taken a look for this on Stackoverflow, and it doesn't seem possible; one interesting solution I have found was about including an iframe into a local file, but it isn't clean and could be inapplicable, as long as many sites deny being loaded in iframes.
Maybe it's just my approach to be wrong, and I'd like to have a confirmation.
Thank you in advance
Let's suppose using browser console to run this loop on a random tab:
Code:
var i = 1;
function myLoop () {
setTimeout(function () {
location.reload()
i++;
if (i < 10) {
myLoop();
}
}, 3000)
}
myLoop();
Now, as title says, I was just wondering if there is a way to execute externally a script by console, and keep it running when page changes - maybe after a form is filled and submitted. I have taken a look for this on Stackoverflow, and it doesn't seem possible; one interesting solution I have found was about including an iframe into a local file, but it isn't clean and could be inapplicable, as long as many sites deny being loaded in iframes.
Maybe it's just my approach to be wrong, and I'd like to have a confirmation.
Thank you in advance