Browse Source

formatting

tags/v1.0.0
Simon Schmidt 2 years ago
parent
commit
b309c0b207
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      data/input.js

+ 2
- 2
data/input.js View File

const terminal = document.querySelector("#term"); const terminal = document.querySelector("#term");
const autoscroll = document.querySelector("#scroll"); const autoscroll = document.querySelector("#scroll");


fetch(`/terminal`, {
fetch('/terminal', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/x-www-form-urlencoded', 'Content-Type': 'application/x-www-form-urlencoded',
// use data- attributes for action // use data- attributes for action
document.querySelectorAll('.control').forEach((button) => { document.querySelectorAll('.control').forEach((button) => {
button.onclick = () => { button.onclick = () => {
fetch(`/action`, {
fetch('/action', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/x-www-form-urlencoded', 'Content-Type': 'application/x-www-form-urlencoded',

Loading…
Cancel
Save