From ea1895c1295d60a194ba3ffdead5324d1b27f1b6 Mon Sep 17 00:00:00 2001 From: Joel Calado Date: Tue, 23 Feb 2021 22:34:59 +0000 Subject: [PATCH 1/2] "no network connection" alert --- main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 3da0279..ca3eeb7 100644 --- a/main.js +++ b/main.js @@ -11982,4 +11982,5 @@ addEventToAll("#multiselect-trigger3", 'mousedown touchend focusin focusout', fu e.stopPropagation(); }); - +// Warns user about network going down +window.addEventListener('offline', function(e) { alert("OBS.Ninja has no network connectivity and can't work properly.") }); From 5bb7bbdd5c57b1ac880f641c588851c6c074e9ac Mon Sep 17 00:00:00 2001 From: Joel Calado Date: Tue, 23 Feb 2021 22:52:55 +0000 Subject: [PATCH 2/2] respect cleanOutput if cleanOutput is set don't alert. Log to console instead. --- main.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index ca3eeb7..2fb7dff 100644 --- a/main.js +++ b/main.js @@ -11983,4 +11983,13 @@ addEventToAll("#multiselect-trigger3", 'mousedown touchend focusin focusout', fu }); // Warns user about network going down -window.addEventListener('offline', function(e) { alert("OBS.Ninja has no network connectivity and can't work properly.") }); + +window.addEventListener("offline", function (e) { + if (!session.cleanOutput) { + alert("OBS.Ninja has no network connectivity and can't work properly."); + } else { + console.log( + "OBS.Ninja has no network connectivity and can't work properly." + ); + } +});