Files
fivem-mcp/resources/views/mcp/templates/nui-script-lua.blade.php
T

21 lines
554 B
PHP
Raw Normal View History

window.addEventListener('message', function(event) {
local data = event.data
if data.action == 'show' then
$('#app').fadeIn()
elseif data.action == 'hide' then
$('#app').fadeOut()
end
end)
$('#closeBtn').click(function()
$.post('https://' .. GetParentResourceName() .. '/close', JSON.stringify({}))
$('#app').fadeOut()
end)
$(document).keyup(function(e)
if e.key == 'Escape' then
$.post('https://' .. GetParentResourceName() .. '/close', JSON.stringify({}))
$('#app').fadeOut()
end
end)