Plugin: Pause ui refresh and force refresh

dsouvik215

Member
May 25, 2018
896
0
16
Under Opera the plugin simply doesn't work from the beginning, when clicking pause-webui button webui simply keep on updating. On FF I can pause the plugin, but after clicking refresh button it start updating itself, not as it should, only once. I'm doing anything else seriously smiley.gif. Don't know what else I can write, maybe you can make some simple log into the logger.

Maybe I'm making some small mistake somewhere, really have no clue why it's not working.
 

das329717

Member
May 25, 2018
928
0
16
1) I think, you must overwrite methods theWebUI.setInterval, theWebUI.resetInterval and clear theWebUI.updTimer if webui is paused. Something like this

plugin.setInterval = theWebUI.setInterval;
theWebUI.setInterval = function( force )
{
plugin.setInterval.call(theWebUI,force);
if( /* webui in pause mode */ && theWebUI.updTimer)
{
window.clearTimeout(theWebUI.updTimer);
theWebUI.updTimer = null;
}
}

2) You must set theWebUI.updTimer to null after call window.clearTimeout(theWebUI.updTimer).
 

shwetha17

Member
May 24, 2018
785
0
16
Sorry for the long wait!
Thanks for the advice Novik65, now I've made some changes and tried it in firefox and everything should work now.
 

das329717

Member
May 25, 2018
928
0
16
You forgot about method theWebUI.resetInterval, it called when user change update interval in settings. You must overwrite it too. And you must use another way for do this, because this.interval must be setted.