Anonymous 0

I've been using this (working) bookmarklet as a template


What that does is translate highlighted text into English suing detect language.

What I want to do is search for highlighted text on a search engine of my choice (twitter) . This is what I have so far:


Error console says "Unterminated string literal"

2 answers

Ktash 1851
This was chosen as the best answer

You have a trailing ' at the end of your statement, after your +e. Remove that and it should work. Also, at the end, it should be +t not +e because e is your charset while t is your selected text.

Answered over 8 years ago by Ktash

What would I need to add so that it open a new tab and does the search there? Also would it be possible to use and event handler instead like Does on on.doubleclick exist ? I'd use a userscript for the event handler version.

Answered over 8 years ago by BDAdams