It's a Google extension in which I copy text from a page and generate a JSON with what it was copied, but I'm not sure how to do it correctly. I was able to do this part but I'm not sure if I have a JSON.
chrome.contextMenus.onClicked.addListener(function(Clique)){
if(Clique.menuItemId == "Clipenews_paragrafo"){
console.log("Sucesso");
var texto = Clique.selectionText;
$.ajax({
url: 'localhost',
dataType: 'json',
method: 'post'
data:{ data:JSON.stringify(texto)},
});
console.log(texto)
}