diff --git a/scripts/account.js b/scripts/account.js index 6377897..105d12e 100644 --- a/scripts/account.js +++ b/scripts/account.js @@ -36,7 +36,6 @@ async function init() { } function buildResourceTable(resources, tableid) { - if (resources instanceof Object) { let table = document.querySelector(tableid); let tbody = table.querySelector("tbody"); diff --git a/scripts/index.js b/scripts/index.js index 56c2c22..4994414 100644 --- a/scripts/index.js +++ b/scripts/index.js @@ -197,7 +197,7 @@ async function handleInstanceAdd() { d.querySelector("#vmid").max = userInstances.vmid.max; } -export class Instance { +class Instance { constructor() { let shadowRoot = document.createElement("div"); shadowRoot.classList.add("w3-row"); @@ -307,7 +307,6 @@ export class Instance { } async handlePowerButton() { - if (!this.actionLock) { let header = `${this.status === "running" ? "Stop" : "Start"} VM ${this.vmid}`; let body = `

Are you sure you want to ${this.status === "running" ? "stop" : "start"} VM

${this.vmid}

` diff --git a/scripts/utils.js b/scripts/utils.js index 973270a..7cb5b12 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -137,7 +137,6 @@ export async function requestAPI(path, method, body = null) { } async function request(url, content) { - let response = await fetch(url, content); let data = null; try {