mirror of
https://github.com/meshtastic/firmware.git
synced 2025-05-04 04:47:25 +00:00
Updated to be host and protocol agnostic
This commit is contained in:
parent
63113d57b3
commit
7f12af73d4
@ -1142,8 +1142,15 @@ void handleBasicJS(HTTPRequest *req, HTTPResponse *res)
|
||||
"\n"
|
||||
" // Create new connection\n"
|
||||
" var httpconn = new meshtasticjs.IHTTPConnection();\n"
|
||||
" let sslActive = false;\n"
|
||||
" let deviceIp = '10.10.30.198'; // Your devices IP here\n"
|
||||
"\n"
|
||||
" // Set connection params\n"
|
||||
" let sslActive;\n"
|
||||
" if (window.location.protocol === 'https:') {\n"
|
||||
" sslActive = true;\n"
|
||||
" } else {\n"
|
||||
" sslActive = false;\n"
|
||||
" }\n"
|
||||
" let deviceIp = window.location.hostname; // Your devices IP here\n"
|
||||
" \n"
|
||||
"\n"
|
||||
" // Add event listeners that get called when a new packet is received / state of device changes\n"
|
||||
|
Loading…
Reference in New Issue
Block a user