Need to get selected text as a string from the current tab

BEGESSDULSE

New Member
Here's the code I currently have:\[code\]var clicked = function(){ var selection chrome.tts.speak(selection, {'lang': 'en-US', 'rate': 0.8, 'enqueue': true});}chrome.contextMenus.create({ "title" : "Say '%s'!", "type" : "normal", "contexts" : ["selection"], "onclick" : clicked()});\[/code\]I need to get the selection from the current tab. I don't know how to get it.Can anyone help?
 
Top