From 7af2087dccacc120521e14816b62f8a39c8d3d8b Mon Sep 17 00:00:00 2001 From: Kavin Muralikrishnan <921563@lcps.org> Date: Sun, 20 Oct 2024 15:44:18 -0400 Subject: [PATCH] Update index.js --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index a7f7388..f5c160b 100644 --- a/index.js +++ b/index.js @@ -224,6 +224,7 @@ async function renderLoop() { let percentage = Math.round(axisValGamepad*100/255); barElements[i].style.background = `linear-gradient(to right, var(--alf-green) ${percentage}%, grey 0%)`; } + if(navigator.getGamepads().length<1) buttonElements.forEach((button) => button.style.background='grey'); if(rawPacket[5]!=0 || rawPacket[6]!=0){ for(let i=7; rawPacket[i]!=0; i++){ if(Object.values(keys).slice(8).includes(rawPacket[i])){