consolidate test-ip definition, added missing Access-Control-Allow-Origin (#1741)

Co-authored-by: CaCO3 <caco@ruinelli.ch>
This commit is contained in:
CaCO3
2023-01-02 14:31:00 +01:00
committed by GitHub
parent 485e55e0b8
commit 4d823b354f
27 changed files with 266 additions and 222 deletions

View File

@@ -1427,13 +1427,13 @@ textarea {
</div>
<script type="text/javascript" src="./gethost.js"></script>
<script type="text/javascript" src="./readconfigcommon.js"></script>
<script type="text/javascript" src="./readconfigparam.js"></script>
<script type="text/javascript" src="common.js"></script>
<script type="text/javascript" src="readconfigcommon.js"></script>
<script type="text/javascript" src="readconfigparam.js"></script>
<script type="text/javascript">
var canvas = document.getElementById('canvas'),
basepath = "http://192.168.178.22";
domainname = getDomainname();
param;
category;
NUNBERSAkt = -1;
@@ -1448,8 +1448,8 @@ function LoadConfigNeu() {
}
basepath = getbasepath();
if (!loadConfig(basepath)) {
domainname = getDomainname();
if (!loadConfig(domainname)) {
alert("Config.ini could not be loaded!\nPlease reload the page.");
return;
}
@@ -2064,14 +2064,14 @@ function saveTextAsFile()
if (confirm("Are you sure you want to update \"config.ini\"?")) {
ReadParameterAll();
WriteConfigININew();
SaveConfigToServer(basepath);
SaveConfigToServer(domainname);
alert("Config.ini is updated!")
}
}
function doReboot() {
if (confirm("Are you sure you want to reboot the ESP32?")) {
var stringota = "/reboot";
var stringota = getDomainname() + "/reboot";
window.location = stringota;
window.location.href = stringota;
window.location.assign(stringota);
@@ -2081,7 +2081,7 @@ function doReboot() {
function editConfigDirect() {
if (confirm("Did you save your changes?")) {
var stringota = "/edit_config.html";
var stringota = getDomainname() + "/edit_config.html";
window.location = stringota;
window.location.href = stringota;
window.location.assign(stringota);