I am trying to add a number that will show up when you mouseover the chrome extension icon, and this number will change as the script runs. However, when I add
chrome.browserAction.setTitle({
title:'it works!';
});
into my content.js file, the entire script stops working. My manifest.json file currently looks like this:
{
"manifest_version": 2,
"name": "sampleName",
"version": "1.0",
"permissions": [
"storage"
],
"browser_action": {
"default_title": "not working"
},
"content_scripts": [
{
"matches": [
"https://www.sample.com"
],
"js": ["content.js"]
}
]
}
Everything works perfectly when I remove the chrome.browserAction.setTitle statement from content.js, so something about that statement is breaking my entire script.
I have encountered a similar issue even though I am calling chrome.browserAction.setTitle in the background script.
It was resolved by removing the default_title from browser_action in manifest.json. It works as expected since then.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With