mac在文本中使用google进行右键快捷翻译
2020-04-19 本文已影响0人
抽象的海宁
image.png
image.png
image.png
image.png
image.png image.png
使用齿轮的quickaction
image.png
image.png
双击run Application
image.png
on run {input, parameters}
set output to "https://translate.google.cn/#auto/zh-CN/" & urldecode(input as string)
tell application "Google Chrome" to open location output
end run
on urldecode(x)
set cmd to "'require \"cgi\"; puts CGI.escape(STDIN.read.chomp)'"
do shell script "echo " & quoted form of x & " | ruby -e " & cmd
end urldecode
拷贝进去覆盖,按command + s保存
就可以了
image.png image.png