Browse Source

Scroll log buffer to end on pageload and show build date.

Thomas Buck 3 years ago
parent
commit
fd96a91e08
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      src/WifiStuff.cpp

+ 8
- 0
src/WifiStuff.cpp View File

378
     message += F("Version: ");
378
     message += F("Version: ");
379
     message += FIRMWARE_VERSION;
379
     message += FIRMWARE_VERSION;
380
     message += F("\n<br>\n");
380
     message += F("\n<br>\n");
381
+    message += F("Build Date: ");
382
+    message += __DATE__;
383
+    message += F("\n<br>\n");
384
+    message += F("Build Time: ");
385
+    message += __TIME__;
386
+    message += F("\n</p><p>\n");
381
     message += F("MAC: ");
387
     message += F("MAC: ");
382
     message += WiFi.macAddress();
388
     message += WiFi.macAddress();
383
     message += F("\n</p>\n");
389
     message += F("\n</p>\n");
491
     message += F(    "var switchstate = document.getElementById('switchstate');\n");
497
     message += F(    "var switchstate = document.getElementById('switchstate');\n");
492
     message += F(    "switchstate.innerHTML = msg.switchstate;\n");
498
     message += F(    "switchstate.innerHTML = msg.switchstate;\n");
493
     message += F("};\n");
499
     message += F("};\n");
500
+    message += F("var hist = document.getElementsByClassName('log')[0];\n");
501
+    message += F("hist.scrollTop = hist.scrollHeight;\n");
494
     
502
     
495
     message += F("var buttons = document.getElementsByTagName('input');\n");
503
     message += F("var buttons = document.getElementsByTagName('input');\n");
496
     message += F("for (let i = 0; i < buttons.length; i++) {\n");
504
     message += F("for (let i = 0; i < buttons.length; i++) {\n");

Loading…
Cancel
Save