Pass selected text to site?

Get more actions or share your own!
Post Reply
dskoe
Posts: 1
Joined: Sun Dec 12, 2010 10:02 pm

Pass selected text to site?

Post by dskoe » Sun Dec 12, 2010 10:07 pm

Can flagfox pass selected text to a site such as google translate or Oxford English Dictionary?
Thanks...

Advertisements

 

User avatar
DaveG
Flagfox Developer
Posts: 722
Joined: Wed Oct 03, 2007 9:06 pm
Location: Philadelphia, USA

Re: Pass selected text to site?

Post by DaveG » Mon Dec 13, 2010 1:45 am

You mean a selection of text in the current page? No, right now it can't, but now that you mention it I see how that could be useful.

You could probably hack something together using the new JavaScript action capabilities in Flagfox 4.1, but it might be simple to add a placeholder to send selected text. I'll look into it.

User avatar
DaveG
Flagfox Developer
Posts: 722
Joined: Wed Oct 03, 2007 9:06 pm
Location: Philadelphia, USA

Re: Pass selected text to site?

Post by DaveG » Mon Dec 13, 2010 2:19 am

On further investigation and thought, I don't think I want to add a placeholder for this as it's not a static piece of data in or for the page like the other placeholders. It changes based on the user's selection, and it the API to get it seems to return messy strings sometimes. Using Flagfox 4.1a4+ you can however do it manually with a JavaScript action:

javascript:{openURL("http://translate.google.com/#auto|{locale-os}|"+window.getSelection().toString())}

Again, this won't work in Flagfox 4.0.x as it uses features new to Flagfox 4.1 development versions.

Post Reply