Answer the question
In order to leave comments, you need to log in
executescript not working
Hello. Tell me why executeScript does not work in the google chrome extension?
Manifest
{
"manifest_version" : 2 ,
"name" : "vkBookmarks" ,
"description" : "bookmarks for vk" ,
"version" : "1.0" ,
"permissions" : [
"tabs", "http://*/*", "https://*/*",
"storage"
],
"background" : {
"scripts" : [
"bg.js"
]
}
}
chrome.tabs.onActivated.addListener(function(data) {
chrome.tabs.executeScript(null, {
code: 'document.body.style.backgroundColor="red"'
});
}) ;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question