I am writing a simple chrome extension which should replace the particular content of the webpage every 5 seconds?
Whether it’s possible to anything like that?
This is my function (This would replace particular content)
replaceText(document.body.innerHTML);
How to run this function every x seconds in my script ‘myscript.js’?
The simplest way would be to use
setTimeout. It will look something like this: