diff --git a/pluginHandler.js b/pluginHandler.js index 6e8d31a7..a1659051 100644 --- a/pluginHandler.js +++ b/pluginHandler.js @@ -97,7 +97,7 @@ module.exports.pluginHandler = function (parent) { if (!Q(d.tabId)) { var defaultOn = 'class="on"'; if (Q('p19headers').querySelectorAll("span.on").length) defaultOn = ''; - QA('p19headers', ''+d.tabTitle+''); + QA('p19headers', ''+d.tabTitle+''); QA('p19pages', '
'); } QV('MainDevPlugins', true); @@ -109,6 +109,7 @@ module.exports.pluginHandler = function (parent) { var tabs = Q('p19headers').querySelectorAll("span"); for (const i of tabs) { i.classList.remove('on'); } el.classList.add('on'); + putstore('_curPluginPage', id); }; obj.addPluginEx = function() { meshserver.send({ action: 'addplugin', url: Q('pluginurlinput').value}); diff --git a/views/default.handlebars b/views/default.handlebars index 7d427bbc..f649d130 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -4581,7 +4581,11 @@ p13clearConsoleMsg(); // Device refresh plugin handler - if (pluginHandler != null) { pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); } + if (pluginHandler != null) { + pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); + var lastTab = getstore('_curPluginPage', null); + if (lastTab != null) pluginHandler.callPluginPage(lastTab, Q('p19ph-' + lastTab)); + } } setupDesktop(); // Always refresh the desktop, even if we are on the same device, we need to do some canvas switching. if (!panel) panel = 10;