Is there a way to look up selected text in Pleco?

Calion

秀才
I've looked, and there doesn't seem to be a way to send the selection to Pleco. It doesn't appear in the Share sheet, and it doesn't show up as an option in Shortcuts. Is there a way to do this?
 

Calion

秀才
There’s another shortcut around here that does that. This one specifically doesn’t. I can hunt it down if you like.

On the other hand—perhaps I could rig this one to do both. How about if for short text, it went to the Definition screen, and for longer text, it goes to the text reader? Would that work for you?
 

Shun

状元
Hi Calion and Pierre,

it's a nice idea. I tried the shortcut, but I have one question: Does the shortcut need to "phone home"? Couldn't it be reduced to just the lower part which does the actual length check and look-up? I did that, and the user experience remained the same, perhaps just the font size wasn't increased. Thanks.

Pleco Shortcut.PNG
 
Last edited:

JD

状元
it's a nice idea. I tried the shortcut, but I have one question: Does the shortcut need to "phone home"?

I thought the same thing. When I first got the shortcut and before running it, I looked through the code and saw that it was trying to phone home, and thought that it might be a virus or some sort of Trojan. Having something call back to an uncertified server definitely looks like malware of some type. I think in this case it’s most likely not, it is intended to cause the shortcut to auto update if there are changes on the original, but even if the intent is positive, it does look suspicious.

Even if the shortcut payload is benign today, with the automated update it could be a sleeper-type of malware, and the future payload could be changed to perform unknown execution when the shortcut is run. I don’t know how restricted on iOS a shortcut‘s access could be. So for example I don’t know if I shortcut could blindly copy to clipboard with whatever is in the buffer and transmit it to another user, or be used to delete files or applications or things like that.

@Shun deleting the phone home code merely turns off the ability of the shortcut to auto update itself. All the functionality still works because it’s just a couple of lines passing the command Pleco.
 
Last edited:

Shun

状元
@JD Oh I see, thank you! So the font resizing also works independently from that and is housed in this HTML code:


I agree with you about the payload. I may be preferable to use a different updating mechanism.
 
Last edited:

JD

状元
@Shun I only have the original, where it merely had these few lines in it (after deleting the phone home). It may have been updated afterwards by the author.
 

Attachments

  • 4C787840-3B93-411E-B499-EDC8F6E604DC.png
    4C787840-3B93-411E-B499-EDC8F6E604DC.png
    635.9 KB · Views: 145

Shun

状元
@JD OK, I have this:

IMG_5548.PNG


It should affect the font size in the Document Reader, but it's currently still very small on my iPhone Xr. (set to 24 pixels)
 

Calion

秀才
it's a nice idea. I tried the shortcut, but I have one question: Does the shortcut need to "phone home"? Couldn't it be reduced to just the lower part which does the actual length check and look-up? I did that, and the user experience remained the same, perhaps just the font size wasn't increased. Thanks.

The "phoning home" is just an auto-update mechanism via UpdateKit API, as mentioned in the readme. Feel free to take it out; all you'll lose is auto-updating. There's nothing malicious in it (at least I hope not!!); it just checks Routinehub for the latest version.
 

Calion

秀才
Even if the shortcut payload is benign today, with the automated update it could be a sleeper-type of malware, and the future payload could be changed to perform unknown execution when the shortcut is run.

I mean, no more so than if you just went to Routinehub and downloaded the latest version. That's all it does, and not "behind the scenes" or anything; just as if you'd clicked on the iCloud Shortcut link (which is essentially what it does).
 
Last edited:

Calion

秀才
Weird. That font size is much bigger on my iPad.

I've updated the shortcut to have a larger font size on iPhone than iPad. Run the shortcut again to upgrade, and tell me what you think.
 
Top