See below for my solution!
If anyone has a use for this, I was able to create the javascript injection with a lot of help from ChatGPT. This code gets pasted into fully kiosk advanced web settings under "inject javascript". I have the hubitat call for a specific version of my normal dashboard via a rule machine rule when HSM is waiting to be disarmed. The script sees that this page has loaded, and then calls the HSM keypad popup forward so that it automatically shows onscreen when the alarm is waiting to disarm. Further, I found a modification to the CSS for that keypad so that is is large now instead of tiny.
if (window.location.href === "http://dashboard you load when HSM is waiting to be disarmed") {
// Wait for 3 seconds (3000 milliseconds) and then click the element
setTimeout(function() {
var element = document.querySelector('.tile-primary.w-full.h-full');
if (element) {
element.click();
} else {
console.log("Element not found!");
}
}, 3000); // 3000 milliseconds = 3 secondssetTimeout(function(){
// Function to find and click the button with the label "Disarm All"
function clickButtonByLabel(labelText) {
// Get all elements with the class '.hsmItem.shadow.m-2.p-2.hover:bg-gray-200.cursor-pointer'
const buttons = document.querySelectorAll('.hsmItem.shadow.m-2.p-2.hover\:bg-gray-200.cursor-pointer');// Loop through all the buttons and check for the correct label buttons.forEach(button => { // Check if the button's inner text matches the labelText we are looking for (exact match) if (button.innerText.includes(labelText)) { button.click(); // Simulate the click on the correct button console.log(`Button with label "${labelText}" clicked!`); } });
}
// Call the function with the label "Disarm All"
clickButtonByLabel("Disarm All");}, 3000);
}else {
console.log("Not on the keypad webpage, so will not load keypad");
}