From 85076da060105721ca53cd16862f3abbf3ad9b1f Mon Sep 17 00:00:00 2001 From: "Rob Swindell (on Debian Linux)" <rob@synchro.net> Date: Thu, 17 Aug 2023 22:21:07 -0700 Subject: [PATCH] Use console.write() when available for outputting spied content Defeats local auto-screen-pausing Fixes issue #603 reported by Nelgin --- exec/mqtt_spy.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/exec/mqtt_spy.js b/exec/mqtt_spy.js index 165c241f92..77f82e1004 100755 --- a/exec/mqtt_spy.js +++ b/exec/mqtt_spy.js @@ -46,7 +46,10 @@ function output(str) else if(my_charset == 'UTF-8') str = utf8_encode(str); } - write(str); + if(js.global.console) + console.write(str); + else + write(str); } if(argc < 1) { -- GitLab