Simple Gesture for Android 的评价
Simple Gesture for Android 作者: utubo
Breadmann 的评价
评分 5 / 5
来自 Breadmann,5 年前Fantastic add on. Excellent work. I was wondering about a few additions. Is there any way to add in a function for pasting text directly into the URL bar? I was trying to see if I could do a custom gesture with JavaScript but I'm not very good with JS, sorry.
Edit 11/27 Sending my thanks for the speedy update. I have been using it once you first released it and it works very well. All the best,
Edit 11/27 Sending my thanks for the speedy update. I have been using it once you first released it and it works very well. All the best,
开发者回应
发布于 5 年前Sorry, version 2.21 could not read clipboard.
So, I fixed it at version 2.22,
and you can use this script to paste and go.
-----------------------------------------------------------
/**
* @name Paste and Go
*/
navigator.clipboard.readText().then(text => {
if (text.startsWith("http://") || text.startsWith("https://")) {
SimpleGesture.open(text);
} else {
SimpleGesture.open('https://www.google.com/search?q=' + encodeURIComponent(text));
}
});
-----------------------------------------------------------
Thank you for your review.
Fix 12/04
if (text.startsWith("^http://") || text.startsWith("^https://")) {
to
if (text.startsWith("http://") || text.startsWith("https://")) {
So, I fixed it at version 2.22,
and you can use this script to paste and go.
-----------------------------------------------------------
/**
* @name Paste and Go
*/
navigator.clipboard.readText().then(text => {
if (text.startsWith("http://") || text.startsWith("https://")) {
SimpleGesture.open(text);
} else {
SimpleGesture.open('https://www.google.com/search?q=' + encodeURIComponent(text));
}
});
-----------------------------------------------------------
Thank you for your review.
Fix 12/04
if (text.startsWith("^http://") || text.startsWith("^https://")) {
to
if (text.startsWith("http://") || text.startsWith("https://")) {