Skip to content

Commit

Permalink
Update server.html
Browse files Browse the repository at this point in the history
  • Loading branch information
inventionpro authored Jun 6, 2024
1 parent 3e336e9 commit c041a2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions user/server.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ <h1 id="name">Name</h1>
<div class="console">
<p>Coming soon</p>
<p id="out"></p>
<input placeholder="Server command" onkeyup="if(event.key==='Enter'){comm(this.value)}">
<input placeholder="Server command" onkeyup="if(event.key==='Enter'){comm(this.value);this.value=''}">
</div>
<script>
const params = new URLSearchParams(window.location.search);
Expand All @@ -117,7 +117,7 @@ <h1 id="name">Name</h1>
PT('servers/'+params.get('id')+'/power', function(){return}, 'POST', `{"signal": "${ac}"}`)
}
function comm(val) {
PT('servers/'+params.get('id')+'/command', function(){return}, 'POST', ``)
PT('servers/'+params.get('id')+'/command', function(){return}, 'POST', JSON.stringify({command: val}))
}
</script>
</body>
Expand Down

0 comments on commit c041a2c

Please sign in to comment.