From 7fb47c28db5fc0549f38df60fe98c2e63368bf71 Mon Sep 17 00:00:00 2001 From: Tyler Bean Date: Wed, 26 Jan 2022 18:07:14 -0600 Subject: [PATCH] add function to check button color --- statusio-selector.user.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/statusio-selector.user.js b/statusio-selector.user.js index 3422e97..5cd4e77 100644 --- a/statusio-selector.user.js +++ b/statusio-selector.user.js @@ -1714,6 +1714,10 @@ function setButtonColor(buttonName) { function clearButtonColor(buttonName) { document.getElementById(buttonName).style.background = ''; }; +function checkButtonColor(buttonName) { + var color = document.getElementById(buttonName).style.background; + return color; +}; function selectCheckbox(box) { box.filter("A")[0].classList.add("checked"); box.filter("INPUT")[0].checked = true;