consolidate test-ip definition, added missing Access-Control-Allow-Origin,

This commit is contained in:
CaCO3
2023-01-02 00:53:14 +01:00
parent e6cb9d67ee
commit 56cfeb732e
28 changed files with 266 additions and 263 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);