Deleting DOM elements before the Page is displayed to the screen (in a Chrome extension)
问题 I am trying to create an extension that will get rid of certain Page elements (by id or class) before the page is displayed to the screen. I've tried using an event listener on the document with "DOMContentLoaded" as the event but the javascript seems to execute after the page is displayed to the user and then deletes it so it's not as smooth as I want (not showing the unwanted content at all) document.addEventListener("DOMContentLoaded", function() { var elements = document