I cant connect with my extension.
I'm trying to connect, Im using repl.it to test but nothing.
My main.js
chrome.runtime.onMessageExternal.addListener(
function(request, sender, sendResponse) {
console.log('Success!!');
console.log(request, sender, sendResponse);
}
);
My code in repl.it
chrome.runtime.sendMessage("hpibninopnnoohihjplmdcmjfkeepahh", {message: "Hello"}, function (response) {
console.log("Response: ", response);
})
My manifest.json
{
"manifest_version": 2,
"name": "Example",
"description": "Trying to connect",
"version": "0.1",
"externally_connectable": {
"matches": [
"https://repl.it/Ngjk"
]
},
"browser_action": {
"default_icon": "icon.png"
},
"background": {
"scripts": ["main.js"],
"persistent": true
},
"permissions": [
"activeTab",
"tabs",
"background"
]
}
I can't see the problem, other code works well but I cant connect and I dont know why.