I would like to hide any text matching a pattern from any HTML page, before it is displayed.
I tried something like that with Greasemonkey :
var html = document.body.innerHTML;
html = html.replace( /some pattern/g, '???' );
document.body.innerHTML = html;
The text I want to hide is correctly replaced with '???', but for a brief moment while the page is loading, I can see the original text. As crescentfresh said, it cannot be fixed with Greasemonkey.
I know I could use a proxy like Proximodo to solve it, but I prefer to avoid having to install it.
What is the simplest way to do this, knowing that it must work on Firefox?
For those interested, I want to use it to hide prices from any page on my girlfriend computer, to let her choose a gift.