Merge branch 'master' of https://github.com/dceejay/RedMap
This commit is contained in:
commit
8e075d891a
@ -363,7 +363,10 @@ All actions also include a:
|
|||||||
`msg._sessionid` property that indicates which client session they came from. Any msg sent out that includes this property will ONLY be sent to that session - so you can target map updates to specific sessions if required.
|
`msg._sessionid` property that indicates which client session they came from. Any msg sent out that includes this property will ONLY be sent to that session - so you can target map updates to specific sessions if required.
|
||||||
`msg._sessionip` property that shows the ip of the client that is connected to the session.
|
`msg._sessionip` property that shows the ip of the client that is connected to the session.
|
||||||
|
|
||||||
The "connected" action also include a `msg._clientheaders` property that shows the headers sent by the client to make a connection to the session.
|
The "connected" action additionally includes a:
|
||||||
|
`msg.payload.parameters` property object that lists the parameters sent in the url.
|
||||||
|
`msg.payload.clientTimezone` property string showing the clients local Timezone. Returns bool of `false` if unable to retrive clients local Timezone.
|
||||||
|
`msg._clientheaders` property that shows the headers sent by the client to make a connection to the session.
|
||||||
|
|
||||||
|
|
||||||
### Utility functions
|
### Utility functions
|
||||||
|
@ -63,7 +63,7 @@ var connect = function() {
|
|||||||
if (!inIframe) {
|
if (!inIframe) {
|
||||||
document.getElementById("footer").innerHTML = "<font color='#494'>"+pagefoot+"</font>";
|
document.getElementById("footer").innerHTML = "<font color='#494'>"+pagefoot+"</font>";
|
||||||
}
|
}
|
||||||
ws.send(JSON.stringify({action:"connected",parameters:Object.fromEntries((new URL(location)).searchParams)}));
|
ws.send(JSON.stringify({action:"connected",parameters:Object.fromEntries((new URL(location)).searchParams),clientTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone || false}));
|
||||||
onoffline();
|
onoffline();
|
||||||
};
|
};
|
||||||
ws.onclose = function() {
|
ws.onclose = function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user