Home
Sign Up
Sign In
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member
Sign In
›
Get Google Chrome
›
Vimium
·
在 Chrome 里使用 vim 快捷键
V2EX
›
Chrome
写了两个 Tampermonkey 的脚本,定位网页上输入框和 Google Translate 快捷键
rock_cloud
·
Aug 5, 2014
· 6031 views
This topic created in 4283 days ago, the information mentioned may be changed or developed.
很简单的一个脚本,按Ctrl+a自动将光标定位于网页上面积最大的 input[type='text'] ,方便使用 Google 和其他一些需要搜索的网站的使用。
不过貌似在京东和淘宝上会出一些问题。
脚本地址
https://github.com/richard-liang/TampermonkeyCode/blob/master/InputFocusor.js
另外还有一个 Google Translate 的快捷键脚本
https://github.com/richard-liang/TampermonkeyCode/blob/master/Translate%20Hotkey.tamper.js
这个功能稍微复杂些:
Ctrl+a 选择输入框所有内容
Ctrl+e 交换翻译语言
Ctrl+r 应用 Google 提供的纠错内容
Ctrl+s 加星
Ctrl+f 将光标至于翻译结果上,可修改翻译结果
Ctrl+j/k 左右移动输入框中的光标
Enter 读出原文内容
Shift+Enter 读出翻译内容
js学的不好,大家多提提意见
光标
脚本
ctrl+a
2 replies
•
2014-08-22 20:08:33 +08:00
1
KillAd
Aug 22, 2014
https://translate.googleapis.com/*
2
rock_cloud
OP
Aug 22, 2014
@
KillAd
这个链接咋是404呢?应该是啥?
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
6017 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 108ms ·
UTC 02:02
·
PVG 10:02
·
LAX 19:02
·
JFK 22:02
♥ Do have faith in what you're doing.
❯