1 line
No EOL
456 B
JavaScript
1 line
No EOL
456 B
JavaScript
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")} |