My chrome background extension script does not load. I followed him, but still nothing. I'm not sure if there is another way to check, but this is not in the Inspect Element, and what the script does not happen.
http://developer.chrome.com/extensions/background_pages.html
manifest.json file
{ "manifest_version": 2, "name": "WebDevFriend", "description": "blah blah blah", "version": "1.0", "permissions": [ "bookmarks", "tabs", "http://*/*" ], "background": { "scripts": ["js/settings.js"], }, "browser_action": { "default_icon": "images/icon.png", "default_popup": "html/popup.html" } }
settings.js file
chrome.windows.onCreated.addListener(function(window){ chrome.windows.getAll(function(windows){ var length = windows.length; if (length == 2) { chrome.tabs.executeScript(null, {file: "content_script.js"}); } }); }); document.write('hello');
source share