QR code and share menu search scripts #3

Merged
sriramsv merged 3 commits from qr-code into master 2022-08-27 01:38:41 -04:00
2 changed files with 0 additions and 63 deletions
Showing only changes of commit 5f48b99bb8 - Show all commits

View File

@@ -1,34 +0,0 @@
-- name = "QR Code"
-- description = "Turn any text or url into QR code"
-- data_source = "https://api.qrserver.com/v1/"
-- type = "search"
-- author = "Sriram SV"
-- version = "1.0"
qr_code_url = "https://api.qrserver.com/v1"
text_from = ""
text_to = ""
local md_color = require "md_colors"
-- constants
local blue = md_colors.blue_500
function on_search(input)
text_to = ""
text_from = input
search:show({input},{blue})
end
function on_click()
if text_to == "" then
get_qr_code(text_from)
end
end
function get_qr_code(text)
url = qr_code_url.."/create-qr-code/?size=150x150&data="..text
system:open_browser(url)
end

View File

@@ -1,29 +0,0 @@
-- name = "Share Text"
-- description = "Share text with other apps"
-- data_source = "internal"
-- type = "search"
-- author = "Sriram SV"
-- version = "1.0"
local md_color = require "md_colors"
-- constants
local blue = md_colors.blue_500
local red = md_colors.red_500
-- variables
text_from = ""
text_to=""
function on_search(input)
text_from = input
text_to = ""
search:show({"Share \""..input.."\""}, {blue})
end
function on_click()
if text_to == "" then
system:share_text(text_from)
end
end