mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 00:16:27 +02:00
Set correct headers for NUI callbacks
This commit is contained in:
@@ -620,6 +620,13 @@ function displayKeyLock( state )
|
||||
}, 2000 );
|
||||
}
|
||||
|
||||
// Prepare headers for HTTP requests
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
},
|
||||
});
|
||||
|
||||
// This function is used to send data back through to the LUA side
|
||||
function sendData( name, data ) {
|
||||
$.post( "https://" + resourceName + "/" + name, JSON.stringify( data ), function( datab ) {
|
||||
@@ -1033,7 +1040,7 @@ $( "body" ).find( "button, div" ).each( function( i, obj ) {
|
||||
------------------------------------------------------------------------------------*/
|
||||
function closeRemote()
|
||||
{
|
||||
sendData( "closeRemote", {} );
|
||||
sendData( "closeRemote", null );
|
||||
|
||||
setEleVisible( elements.plateReaderBox, false );
|
||||
setEleVisible( elements.uiSettingsBox, false );
|
||||
|
||||
Reference in New Issue
Block a user