Add click listener to Country search script
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
|
||||
--- Original code: https://dev.fandom.com/wiki/Global_Lua_Modules/Country
|
||||
|
||||
local url = require("url")
|
||||
|
||||
function on_search(str)
|
||||
if str == nil then return end
|
||||
|
||||
@@ -20,6 +22,10 @@ function on_search(str)
|
||||
end
|
||||
end
|
||||
|
||||
function on_click()
|
||||
system:open_browser("https://google.com/search?q="..url.quote(result))
|
||||
end
|
||||
|
||||
function getCountryData(code, info)
|
||||
if info and code then
|
||||
-- if the code doesn't exist try looking for a country name
|
||||
|
||||
Reference in New Issue
Block a user