Fix javascript regression failing page refreshes

This commit is contained in:
Theo Arends 2022-04-06 12:41:06 +02:00
parent 973354470c
commit 218d62686a
2 changed files with 3 additions and 3 deletions

View File

@ -116,7 +116,7 @@ const char HTTP_SCRIPT_HIDE[] PROGMEM =
"}"; "}";
const char HTTP_SCRIPT_RELOAD_TIME[] PROGMEM = const char HTTP_SCRIPT_RELOAD_TIME[] PROGMEM =
"setTimeout(()=>{location.href='.';},%d);"; "setTimeout(function(){location.href='.';},%d);";
#ifdef USE_UNISHOX_COMPRESSION #ifdef USE_UNISHOX_COMPRESSION
#include "./html_compressed/HTTP_SCRIPT_CONSOL.h" #include "./html_compressed/HTTP_SCRIPT_CONSOL.h"
@ -984,7 +984,7 @@ void WebRestart(uint32_t type)
#if ((RESTART_AFTER_INITIAL_WIFI_CONFIG) && (AFTER_INITIAL_WIFI_CONFIG_GO_TO_NEW_IP)) #if ((RESTART_AFTER_INITIAL_WIFI_CONFIG) && (AFTER_INITIAL_WIFI_CONFIG_GO_TO_NEW_IP))
// In case of type 3 (New network has been configured) go to the new device's IP in the new Network // In case of type 3 (New network has been configured) go to the new device's IP in the new Network
if (3 == type) { if (3 == type) {
WSContentSend_P("setTimeout(()=>{location.href='http://%_I';},%d);", WSContentSend_P("setTimeout(function(){location.href='http://%_I';},%d);",
(uint32_t)WiFi.localIP(), (uint32_t)WiFi.localIP(),
HTTP_RESTART_RECONNECT_TIME HTTP_RESTART_RECONNECT_TIME
); );

View File

@ -1716,7 +1716,7 @@ const char ZB_WEB_U[] PROGMEM =
// index 4 // index 4
// Auto-refresh // Auto-refresh
//=ZB_WEB_AUTO_REFRESH //=ZB_WEB_AUTO_REFRESH
"<script>setTimeout(()=>{location.reload();},1990);</script>" "<script>setTimeout(function(){location.reload();},1990);</script>"
"\0" "\0"
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++ // +++++++++++++++++++++++++++++++++++++++++++++++++++++++