Chrome content scripts aren't working: DOMContentLoaded listener does not execute
问题 I am trying to code extension that corrects misspellings on 1 forum. I am trying to access <p> tag, with content script, but it doesn't change anything (using the code below): document.addEventListener("DOMContentLoaded", function() { document.getElementsByTagName("P")[4].innerHTML = "correct_word"; }); It doesn't change anything when added as an extension, apparently if I wget the page, and put the script there, all works. Any thoughts? My manifest.json file: { "manifest_version": 2, "name":