mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
Fix download binary button for firefox
This commit is contained in:
parent
e646f02e27
commit
7556845079
1 changed files with 3 additions and 1 deletions
|
@ -176,7 +176,7 @@ const fetchPing = () => {
|
||||||
|
|
||||||
fetch('/ping', {credentials: "same-origin"}).then(res => res.json())
|
fetch('/ping', {credentials: "same-origin"}).then(res => res.json())
|
||||||
.then(response => {
|
.then(response => {
|
||||||
for (let filename in response) {
|
for (let filename of response) {
|
||||||
let node = document.querySelector(`.status-indicator[data-node="${filename}"]`);
|
let node = document.querySelector(`.status-indicator[data-node="${filename}"]`);
|
||||||
if (node === null)
|
if (node === null)
|
||||||
continue;
|
continue;
|
||||||
|
@ -474,7 +474,9 @@ downloadButton.addEventListener('click', () => {
|
||||||
const link = document.createElement("a");
|
const link = document.createElement("a");
|
||||||
link.download = name;
|
link.download = name;
|
||||||
link.href = '/download.bin?configuration=' + encodeURIComponent(configuration);
|
link.href = '/download.bin?configuration=' + encodeURIComponent(configuration);
|
||||||
|
document.body.appendChild(link);
|
||||||
link.click();
|
link.click();
|
||||||
|
link.remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
const cleanMqttModalElem = document.getElementById("modal-clean-mqtt");
|
const cleanMqttModalElem = document.getElementById("modal-clean-mqtt");
|
||||||
|
|
Loading…
Reference in a new issue