mirror of
https://github.com/Laxilef/OTGateway.git
synced 2026-01-02 21:43:37 +05:00
Compare commits
4 Commits
de7c178bf1
...
05acc8162f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05acc8162f | ||
|
|
26d10fe02a | ||
|
|
bcf2192d8a | ||
|
|
f2db7cd529 |
@@ -92,6 +92,7 @@
|
|||||||
import { ESPLoader, Transport } from "https://unpkg.com/esptool-js/bundle.js";
|
import { ESPLoader, Transport } from "https://unpkg.com/esptool-js/bundle.js";
|
||||||
|
|
||||||
let esploader = null;
|
let esploader = null;
|
||||||
|
const corsProxy = "https://corsproxy.laxilef.workers.dev/?";
|
||||||
const fwVersion = document.querySelector("[name='fwVersion']");
|
const fwVersion = document.querySelector("[name='fwVersion']");
|
||||||
const fwBoardContainer = document.querySelector(".fwBoardContainer");
|
const fwBoardContainer = document.querySelector(".fwBoardContainer");
|
||||||
const fwBoard = document.querySelector("[name='fwBoard']");
|
const fwBoard = document.querySelector("[name='fwBoard']");
|
||||||
@@ -168,7 +169,7 @@
|
|||||||
fwBoard.remove(1);
|
fwBoard.remove(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await fetch(`https://corsproxy.io/?url=${configUrl}`, {
|
const response = await fetch(`${corsProxy}${configUrl}`, {
|
||||||
cache: "no-cache"
|
cache: "no-cache"
|
||||||
});
|
});
|
||||||
const boards = await response.json();
|
const boards = await response.json();
|
||||||
@@ -270,7 +271,7 @@
|
|||||||
statusContainer.textContent = "Downloading files...";
|
statusContainer.textContent = "Downloading files...";
|
||||||
|
|
||||||
for (let file of files) {
|
for (let file of files) {
|
||||||
const response = await fetch(`https://corsproxy.io/?url=${file.url}`, {
|
const response = await fetch(`${corsProxy}${file.url}`, {
|
||||||
cache: "no-cache"
|
cache: "no-cache"
|
||||||
});
|
});
|
||||||
const firmwareArrayBuffer = await response.arrayBuffer();
|
const firmwareArrayBuffer = await response.arrayBuffer();
|
||||||
|
|||||||
Reference in New Issue
Block a user