community scripts refactoring and cleanup
This commit is contained in:
22
community/net-file-widget.lua
Normal file
22
community/net-file-widget.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
-- name = "Network file"
|
||||
-- description = "Shows the contents of any file on the Internet"
|
||||
-- author = "Evgeny Zobnin (zobnin@gmail.com)"
|
||||
-- version = "1.0"
|
||||
|
||||
function on_resume()
|
||||
local args = settings:get()
|
||||
|
||||
if next(args) == nil then
|
||||
ui:show_text("Tap to enter text file URL")
|
||||
else
|
||||
http:get(args[1])
|
||||
end
|
||||
end
|
||||
|
||||
function on_click()
|
||||
aio:show_args_dialog()
|
||||
end
|
||||
|
||||
function on_network_result(result)
|
||||
ui:show_text(result)
|
||||
end
|
||||
Reference in New Issue
Block a user