I'm working on building chrome extension. I have an error - Unchecked runtime.lastError while running tabs.executeScript: Cannot access a chrome:// URL at Object.callback (). I don't know what to do.
manifest.json
{
"manifest_version": 2,
"name": "tabs",
"description": "testing tabs",
"version": "1.0.4",
"icons": { "128": "icon_128.png" },
"browser_action": {
"default_icon": "icon.png",
"default_title": "A popup will come here"
},
"background": {
"scripts": ["background.js"]
},
"permissions": ["tabs", "*://*/*", "background"]
}
background.js
chrome.tabs.query({}, function(tabs) {
for(var i= 0; i < tabs.length; i++) {
chrome.tabs.executeScript(null, {
code: "console.log('wow');"
});
}
});
Thanks in advance.