Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension

UPDATE: Finally figured out your problem. In eventPage.js, you tried to inject js/Leoscript.js, which is NOT whitelisted, instead of js/LeoScript.js (with a capital ‘S’), which is whitelisted. Note that URLs are case-sensitive!

chrome.tabs.executeScript(tabId, {file: 'js/LeoScript.js'});

LeoScript.js:

alert('injected');
document.getElementById('username').value="aaaaaaa";

Leave a Comment