I think I need to give full domain?

This commit is contained in:
Skylar Grant 2024-08-15 10:51:53 -04:00
parent 4ff6404958
commit 6cf9d622cb
2 changed files with 8 additions and 8 deletions

View File

@ -23,12 +23,6 @@ const config = {
} }
}; };
window.onload = function() {
psState.init(config);
comms.init(psState, config);
refreshState(window.document, psState);
};
function refreshState(doc, state) { function refreshState(doc, state) {
const igniterStatus = doc.getElementById("igniter-status"); const igniterStatus = doc.getElementById("igniter-status");
const exhaustStatus = doc.getElementById("exhaust-status"); const exhaustStatus = doc.getElementById("exhaust-status");
@ -52,4 +46,10 @@ function refreshState(doc, state) {
function togglePower(element) { function togglePower(element) {
psState[element].power(comms); psState[element].power(comms);
refreshState(window.document, psState); refreshState(window.document, psState);
} }
window.onload = function() {
psState.init(config);
comms.init(psState, config);
refreshState(window.document, psState);
};

View File

@ -77,7 +77,7 @@
</div> </div>
<script src="https://cdn.tailwindcss.com"></script> <script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/mqtt/dist/mqtt.js"></script> <script src="https://unpkg.com/mqtt/dist/mqtt.js"></script>
<script type="module" src="./assets/hestia.js"></script> <script type="module" src="https://ps.3411.one/assets/hestia.js"></script>
</body> </body>
</html> </html>