Browse Source

Use CDNs for 3rd party js libs

Thomas Buck 7 years ago
parent
commit
17fd7c6886
6 changed files with 41 additions and 33 deletions
  1. 0
    0
      client-script.js
  2. 41
    0
      config.h
  3. 0
    16
      static/Chart.bundle.min.js
  4. 0
    6
      static/bootstrap.min.css
  5. 0
    7
      static/bootstrap.min.js
  6. 0
    4
      static/jquery-3.1.1.min.js

static/script.js → client-script.js View File


+ 41
- 0
config.h View File

@@ -0,0 +1,41 @@
1
+#ifndef __CONFIG_H__
2
+#define __CONFIG_H__
3
+
4
+#define WEB_PORT 80
5
+#define BROADCAST_PORT 2390
6
+#define WEBSOCKET_PORT 2391
7
+#define NTP_PORT_FROM 2392
8
+#define NTP_PORT_TO 123
9
+
10
+// WiFi Credentials for the captive config portal AP
11
+#define DEFAULT_SSID "ESP-Weather"
12
+#define DEFAULT_PASS "testtest"
13
+
14
+#define MAX_BROADCAST_WAIT_TIME 550
15
+#define NTP_RETRY_TIMEOUT 2500
16
+#define NTP_SERVER_NAME "time.nist.gov"
17
+#define NTP_PACKET_SIZE 48
18
+#define UDP_PACKET_BUFFER_SIZE 25
19
+
20
+// Size of EEPROM for history storage.
21
+// 4096 should be ok, but too large values cause system crashes!
22
+#define EEPROM_SIZE 512
23
+
24
+// Broadcast Identifier. Change this when the protocol changes!
25
+#define UDP_PING_CONTENTS "pingESP8266v0.1"
26
+#define UDP_ECHO_CONTENTS "echoESP8266v0.1"
27
+
28
+// Using the RawGit.com service to serve the scripts directly from GitHub.
29
+// Consider using cdn.rawgit.com to reduce their server load.
30
+#define HTML_BEGIN "<html><head><title>ESP-Weather</title>\
31
+<script src=\"https://code.jquery.com/jquery-3.1.1.min.js\" integrity=\"sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=\" crossorigin=\"anonymous\"></script>\
32
+<script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js\" integrity=\"sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa\" crossorigin=\"anonymous\"></script>\
33
+<script src=\"https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.bundle.min.js\" integrity=\"sha256-RASNMNlmRtIreeznffYMDUxBXcMRjijEaaGF/gxT6vw=\" crossorigin=\"anonymous\"></script>\
34
+<script src=\"https://rawgit.com/xythobuz/ESP-Weather/master/client-script.js\"></script>\
35
+<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\" integrity=\"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u\" crossorigin=\"anonymous\">\
36
+</head><body><script type=\"text/javascript\">"
37
+
38
+#define HTML_END "</script></body></html>"
39
+
40
+#endif // __CONFIG_H__
41
+

+ 0
- 16
static/Chart.bundle.min.js
File diff suppressed because it is too large
View File


+ 0
- 6
static/bootstrap.min.css
File diff suppressed because it is too large
View File


+ 0
- 7
static/bootstrap.min.js
File diff suppressed because it is too large
View File


+ 0
- 4
static/jquery-3.1.1.min.js
File diff suppressed because it is too large
View File


Loading…
Cancel
Save