If you got some messy code output, created by Javascript, you should decode it to find out what exactly is going on.
Let’s say you have an output like: u0437u0430u043fu0440u0435u0449 . From the first sight I have no idea what it is.
But you can easily decode almost any encoding at this page: http://0xcc.net/jsescape/
You can use any kind of encoded format. And you can just save the file as HTML and test it locally as there is nothing uploaded to the server.
If you know any other decoder, let me know.