It is an very old trick that was resurrected

.
And probably where i saw it that guy stole it from someone else

Where is saw it was in a "crackme" a program which you are supposed to crack for fun.
The code was encrypted, no biggie just a matter of "unpacking" it.
encrypting also serves purpose of hiding strings so they can not be sniffed.
But here was the cute part.
If you ran the program not inside the debugger (softice) it would do what it was supposed to.
But If you ran the proggie in softice it would do another thing.
Anyway in a nutshell he was setting a error handler.
Then he would trigger an exception, but if an exception occurs while in the debugger it will be ignored
(since debugger works by catching exception when it single steps)
But the actual "program" was inside the exception handler.
Encrypting the JS is a good idea, but the weakness is that the decryptor leaves a footprint.
Solution to that is use a well know encryptor/decryptor which u can find on the net.
That way u get mixed up with legit sites

Maybe
http://scriptasylum.com/tutorials/encdec/javascript_encoder.htmlThen u can do ur nasty inside

.
The only real defense you have is stealth.
Once it has been determined that there is some sort of protection it can be removed given enuff time.
This would require a lot of work so not really a serious idea

But find out "quirks" that various browsers can do.
then hide ur cloaking using that.
For example IE can execute JS in CSS.
If when it request the ajax it not an IE browser ......

I personally think that G parses JS, but does not actually execute it.
Possibly it might change in the future.
But if G actually executes JS this opens up all sorts of possibilities.
(that is why i doubt they execute).
Anyway my ideas take with grain of salt
