From 608f1b5543457cf2742d496fb287d1b7590881d4 Mon Sep 17 00:00:00 2001 From: louisa Date: Thu, 11 May 2023 13:40:50 +0200 Subject: [PATCH] background change when knob is at 21 --- public/index.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/index.html b/public/index.html index 33a7bff..ce9ec83 100644 --- a/public/index.html +++ b/public/index.html @@ -16,6 +16,13 @@ // Listen for custom events from the server socket.on('node-data', function(data) { console.log(data); // Log the received data to the browser's console + if (node === 'node4' && value === '21') { + // Change the background color to red + document.body.style.backgroundColor = 'red'; + } else { + // Restore the default background color + document.body.style.backgroundColor = 'white'; + } });