Trying out the page-eater example, I can see while the text ‘This page has been eaten’ displays, it displays after the normal web page loads and displays for a split second.
I have had the same problem trying to program content replacing. How do I program a web extension to process the web page before it displays?