While developing the extension, I had the need to save the text from the context menu of Google Chrome (appears if you click on the text with the right mouse button)
The problem is that I can't get text if the extension isn't active (ie out of focus)
Tell me how I can save the selected text in the state?
function getword(info) {
alert(info.selectionText)
}
chrome.contextMenus.create({
title: "Text: %s",
contexts: ["selection"],
onclick: getword
});