diff --git a/htdocs/lib/DemodulatorPanel.js b/htdocs/lib/DemodulatorPanel.js index 0994e4c..fb6e7c3 100644 --- a/htdocs/lib/DemodulatorPanel.js +++ b/htdocs/lib/DemodulatorPanel.js @@ -136,6 +136,13 @@ DemodulatorPanel.prototype.updatePanels = function() { toggle_panel("openwebrx-panel-js8-message", modulation == "js8"); toggle_panel("openwebrx-panel-packet-message", modulation === "packet"); toggle_panel("openwebrx-panel-pocsag-message", modulation === "pocsag"); + + modulation = this.getDemodulator().get_modulation(); + var showing = 'openwebrx-panel-metadata-' + modulation; + $(".openwebrx-meta-panel").each(function (_, p) { + toggle_panel(p.id, p.id === showing); + }); + clear_metadata(); }; DemodulatorPanel.prototype.getDemodulator = function() { diff --git a/htdocs/openwebrx.js b/htdocs/openwebrx.js index 47c8800..2e41038 100644 --- a/htdocs/openwebrx.js +++ b/htdocs/openwebrx.js @@ -1110,13 +1110,6 @@ function update_pocsag_panel(msg) { $b.scrollTop($b[0].scrollHeight); } -function update_digitalvoice_panels(showing) { - $(".openwebrx-meta-panel").each(function (_, p) { - toggle_panel(p.id, p.id === showing); - }); - clear_metadata(); -} - function clear_metadata() { $(".openwebrx-meta-panel .openwebrx-meta-autoclear").text(""); $(".openwebrx-meta-slot").removeClass("active").removeClass("sync");