Re:Encode any JavaScript with only six characters
by jr62 on Saturday November 26, 2011 @12:09AM
(#3279114)
On Chrome 14 (Linux), when I click "eval" it doesn't show the alert dialog. Even leaving the default text there. It's an interesting concept though, would definitely be good to see an explanation of how it works.
[ Parent
| on HN ]
Re:Encode any JavaScript with only six characters
by quanticle on Saturday November 26, 2011 @12:14AM
(#3279120)
If I try copying and pasting the encoded source into Chrome's JS console, it gives the following error:
TypeError: Array.prototype.sort called on null or undefined.
I would be interested to see what exactly it's doing, and how alert("Hello World"); gets mangled to call Array.prototype.sort().EDIT: I should note that I get this error no matter what code I put in. I think Chrome's Javascript interpreter is somehow interpreting some of that boilerplate as a call to Array.prototype.sort() somehow.