Team-Resurgent/PrometheOS/PrometheOS-Firmware-1.5.0/PrometheOSUtility/PrometheOSPacker/bundle/index.js

1 line
456 B
JavaScript
Raw Normal View History

2025-07-11 21:28:24 +02:00
async function screenshot(){await fetch("http://192.168.1.66/api/screenshot").catch(()=>{content.innerHTML="Failed to connect."}).then(n=>n.blob()).then(n=>{var i=window.URL.createObjectURL(n),t=document.createElement("a");t.href=i;t.download="screenshot.png";document.body.appendChild(t);t.click();t.remove()})}async function reboot(){await fetch("http://192.168.1.66/api/reboot")}async function shutdown(){await fetch("http://192.168.1.66/api/shutdown")}