mh ... this should change the contents of the page
unsafeWindow.document.documentElement.innerHTML='DEFACED!!!!!!1!!!'
You can rely on GM_xmlhttpRequest() to get this content.
The real problem here is at what point greasemonkey starts; that is: too late for the user to not notice what happened.
I'm not sure what you are trying to achieve here. Is this a prank or user access scheme to the laboratory?
In any case, so that the user does not notice that in the end you will need to do one of two things:
- write a full-fledged firefox extension that hits earlier than GM at boot time,
- add an opaque proxy server.
source share