diff --git a/ru/quotes-ru-widget.lua b/ru/quotes-ru-widget.lua index 5d16208..96ad088 100644 --- a/ru/quotes-ru-widget.lua +++ b/ru/quotes-ru-widget.lua @@ -11,8 +11,14 @@ function on_alarm() end function on_network_result(result) - local quote = ajson:get_value(result, "object string:quoteText") - local author = ajson:get_value(result, "object string:quoteAuthor") + quote = ajson:get_value(result, "object string:quoteText") + author = ajson:get_value(result, "object string:quoteAuthor") ui:show_lines({ quote }, { author }) end + +function on_click() + if quote ~= nil then + system:copy_to_clipboard(quote) + end +end