Is it possible to update it using an interval? I have tried:
var timers = require("timers");
var pageMod = require("page-mod");
var mystyle = ....;
function func1(){
pageMod.PageMod({
include: "*.org",
contentScript: mystyle
});
}
func1();
function func2(){
mysyle = http://......
}
timers.setInterval(func2,10000);
The problem is that it will start registering pageMod couple of times every interval. Let's say I have inside of mystyle: alert("hello world"); so I'll go to to some page, after 30 seconds it when I'll refresh that single page it will execute 3 times "hello world" inside of alert box. I want it to execute only once and updateing the mystle every 30 seoncds.