v0.1.8
1. 右键对译文或者原文进行朗读 2. 修改说明文件
This commit is contained in:
@@ -67,11 +67,24 @@ local rightClickCallbackFn = function(index)
|
||||
{ title = "查看网页", fn = function()
|
||||
sheetView:url(selectResult.webUrl):show()
|
||||
end },
|
||||
{ title = "-" },
|
||||
{ title = "朗读译文", fn = function()
|
||||
speak(selectResult.text)
|
||||
end },
|
||||
{ title = "朗读原文", fn = function()
|
||||
speak(selectResult.subText)
|
||||
end },
|
||||
})
|
||||
menubar:popupMenu(hs.mouse.getAbsolutePosition(), true)
|
||||
end
|
||||
end
|
||||
|
||||
-- 系统发音
|
||||
function speak(str)
|
||||
speaker = hs.speech.new()
|
||||
speaker:speak(str)
|
||||
end
|
||||
|
||||
function getBaiduApi(q)
|
||||
headers = {ContentType = "application/x-www-form-urlencoded;charset=utf-8"}
|
||||
salt = tostring(hs.timer.secondsSinceEpoch()*1000)
|
||||
|
||||
Reference in New Issue
Block a user