Added gstore func to send a message
This commit is contained in:
parent
64d04d83b9
commit
c02253dc11
|
@ -35,5 +35,12 @@ window.gstore.add('min_menu', true);
|
|||
|
||||
// Functions
|
||||
window.gstore.add('func', {
|
||||
toggleMenuSize: function(){ window.gstore.data.min_menu=!window.gstore.data.min_menu; }
|
||||
toggleMenuSize: function(){ window.gstore.data.min_menu=!window.gstore.data.min_menu; },
|
||||
sendMessage: function(msg){
|
||||
/* (1) Send message to WebSocket */
|
||||
window.wsc_chat.send(JSON.stringify({message: msg}));
|
||||
|
||||
/* (2) Add locally */
|
||||
window.gstore.data.notif[1].data.push([ window.gstore.data.server.session.name, msg ]);
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue