nothing to see here
This commit is contained in:
@@ -737,7 +737,7 @@ end
|
||||
--[[-- startup logic --]]--
|
||||
local args = {...}
|
||||
if #args < 1 then
|
||||
error('supply file name')
|
||||
error('supply file name or URL')
|
||||
end
|
||||
|
||||
Builder.itemAdapter = Adapter.wrap({ side = 'bottom', direction = 'up' })
|
||||
|
||||
@@ -70,7 +70,9 @@ function setup:eventHandler(event)
|
||||
if not fs.exists(STARTUP_FILE) then
|
||||
Util.writeFile(STARTUP_FILE,
|
||||
[[os.sleep(1)
|
||||
shell.openForegroundTab('packages/milo/MiloRemote')]])
|
||||
if shell.openForegroundTab then
|
||||
shell.openForegroundTab('packages/milo/MiloRemote')
|
||||
end]])
|
||||
end
|
||||
elseif fs.exists(STARTUP_FILE) then
|
||||
fs.delete(STARTUP_FILE)
|
||||
|
||||
@@ -72,14 +72,14 @@ function init(jua)
|
||||
if async then
|
||||
jua.on("websocket_success", function(event, url, handle)
|
||||
local success, id = pcall(findID,url)
|
||||
if id and callbackRegistry[id] and callbackRegistry[id].success then
|
||||
if success and id and callbackRegistry[id] and callbackRegistry[id].success then
|
||||
callbackRegistry[id].success(id, handle)
|
||||
end
|
||||
end)
|
||||
|
||||
jua.on("websocket_failure", function(event, url)
|
||||
local success, id = pcall(findID,url)
|
||||
if id and callbackRegistry[id] and callbackRegistry[id].failure then
|
||||
if success and id and callbackRegistry[id] and callbackRegistry[id].failure then
|
||||
callbackRegistry[id].failure(id)
|
||||
end
|
||||
table.remove(callbackRegistry, id)
|
||||
@@ -87,14 +87,14 @@ function init(jua)
|
||||
|
||||
jua.on("websocket_message", function(event, url, data)
|
||||
local success, id = pcall(findID,url)
|
||||
if id and callbackRegistry[id] and callbackRegistry[id].message then
|
||||
if success and id and callbackRegistry[id] and callbackRegistry[id].message then
|
||||
callbackRegistry[id].message(id, data)
|
||||
end
|
||||
end)
|
||||
|
||||
jua.on("websocket_closed", function(event, url)
|
||||
local success, id = pcall(findID,url)
|
||||
if id and callbackRegistry[id] and callbackRegistry[id].closed then
|
||||
if success and id and callbackRegistry[id] and callbackRegistry[id].closed then
|
||||
callbackRegistry[id].closed(id)
|
||||
end
|
||||
table.remove(callbackRegistry, id)
|
||||
|
||||
Reference in New Issue
Block a user