diff --git a/.gitignore b/.gitignore index e65d6fd8..4b197432 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,8 @@ data/* !data/vars.css !data/style.css !data/style.css.gz +!data/script.js +!data/script.js.gz src/user_setups/active/* include/user_config_override.h src/user_config_override.h diff --git a/data/script.js b/data/script.js new file mode 100644 index 00000000..9a8e4bea --- /dev/null +++ b/data/script.js @@ -0,0 +1 @@ +function aref(e){setTimeout(function(){ref("")},1e3*e)}function ref(e){var o=(new Date).getTime();return document.getElementById("bmp").src="?a="+e+"&q="+o,!1}function about(){document.getElementById("doc").innerHTML='
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Based on the previous work of the following open source developers:
Copyright© 2019 Allen Derusha allen @derusha.orgMIT License
Copyright© 2021 LVGL KftMIT License
Copyright© 2020-2021 Francis Van RoieMIT License
Copyright© 2020 Bodmer (https://github.com/Bodmer) All rights reserved.FreeBSD License
includes parts from the Adafruit_GFX libraryCopyright© 2012 Adafruit Industries. All rights reservedBSD License
Copyright© 2014-2021 Benoit BLANCHONMIT License
Copyright© 2008-2015 Nicholas O'LearyMIT License
Copyright© 2017,2018 Thijs Elenbaas, MrRobot62, rahuldeo2047, NOX73, dhylands, Josha blemasle, mfalkviddMIT License
Copyright© Project NayukiMIT License
Copyright© 2018 Brian T. ParkMIT License
'} \ No newline at end of file diff --git a/data/script.js.gz b/data/script.js.gz new file mode 100644 index 00000000..35c934fd Binary files /dev/null and b/data/script.js.gz differ diff --git a/src/sys/svc/hasp_http.cpp b/src/sys/svc/hasp_http.cpp index 481b5164..f91986d8 100644 --- a/src/sys/svc/hasp_http.cpp +++ b/src/sys/svc/hasp_http.cpp @@ -123,6 +123,8 @@ extern const uint8_t EDIT_HTM_GZ_START[] asm("_binary_data_edit_htm_gz_start"); extern const uint8_t EDIT_HTM_GZ_END[] asm("_binary_data_edit_htm_gz_end"); extern const uint8_t STYLE_CSS_GZ_START[] asm("_binary_data_style_css_gz_start"); extern const uint8_t STYLE_CSS_GZ_END[] asm("_binary_data_style_css_gz_end"); +extern const uint8_t SCRIPT_JS_GZ_START[] asm("_binary_data_script_js_gz_start"); +extern const uint8_t SCRIPT_JS_GZ_END[] asm("_binary_data_script_js_gz_end"); #endif // CONFIG_IDF_TARGET_ESP32 #endif // ESP32 @@ -139,8 +141,9 @@ const char HTTP_DOCTYPE[] PROGMEM = "Based on the previous work of the following open source developers.
includes parts from the Adafruit_GFX libraryCopyright© 2012 Adafruit Industries. " - "All rights reservedBSD License
"); - httpMessage += F("Based on the previous work of the following open source developers.
includes parts from the + Adafruit_GFX libraryCopyright© 2012 Adafruit Industries. " "All rights reservedBSD + License
"); httpMessage += F("Permission is hereby granted, free of charge, to any person obtaining a copy of this software and " + "associated documentation files(the \"Software\"), to deal in the Software without restriction, including " + "without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell " + "copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the " + "following conditions:
" + "The above copyright notice and this permission notice shall be included in all copies or substantial " + "portions of the Software.
THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, " + "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR " + "PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, " + "DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN " + "CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Based on the previous work of the following open source developers:
" + "Copyright© 2019 Allen Derusha allen@derusha.orgMIT License
" + "Copyright© 2021 LVGL KftMIT License
" + "Copyright© 2020-2021 Francis Van RoieMIT License
" + "Copyright© 2020 Bodmer (https://github.com/Bodmer) All rights " + "reserved.FreeBSD License
" + "includes parts from the Adafruit_GFX libraryCopyright© 2012 Adafruit Industries. All " + "rights reservedBSD License
" + "Copyright© 2014-2021 Benoit BLANCHONMIT License
" + "Copyright© 2008-2015 Nicholas O'LearyMIT License
" + "Copyright© 2017,2018 Thijs Elenbaas, MrRobot62, rahuldeo2047, NOX73, dhylands, " + "Josha blemasle, mfalkviddMIT License
" + "Copyright© Project NayukiMIT License
" + "Copyright© 2018 Brian T. ParkMIT License
';}"; webSendCached(200, PSTR("text/javascript"), javascript.c_str(), javascript.length()); } +*/ //////////////////////////////////////////////////////////////////////////////////////////////////// static inline void webStartConfigPortal() @@ -2390,7 +2434,7 @@ void httpSetup() // Shared pages between STA and AP webServer.on(F("/about"), webHandleAbout); webServer.on(F("/vars.css"), webSendCssVars); - webServer.on(F("/js"), webSendJavascript); + // webServer.on(F("/js"), webSendJavascript); webServer.onNotFound(httpHandleNotFound); #if HASP_USE_WIFI > 0 diff --git a/user_setups/esp32/_esp32.ini b/user_setups/esp32/_esp32.ini index 8fa46ad8..7c764df6 100644 --- a/user_setups/esp32/_esp32.ini +++ b/user_setups/esp32/_esp32.ini @@ -92,6 +92,7 @@ platform = espressif32@^3.3.2 board_build.embed_files = data/edit.htm.gz data/style.css.gz + data/script.js.gz board_build.filesystem = littlefs ; ----- crash reporter monitor_filters = esp32_exception_decoder