I have always learnt how to code by example. I find some one else's code open it up have a look around, and start hacking. But every once in a while I'll come across some code that has been obfuscated. It has never stopped me in the past, and usually I've taken a long and laborious way to make it readable again.
Well today, I was feeling particularly impatient with the JavaScript I wanted to open up. I looked through my Firefox plugins and found nothing, so I then googled for a solution. To my surprise I found something extremely simple and elegant.
alert(function showMeTheCode() { yourJSgoesHere });
The "yourJSgoesHere" is of course replaced with the code you want to unobfuscate. Firefox will then print you an alert with neatly formatted JavaScript. Enjoy! ![]()
Tags: code, JavaScript, obfuscate, Programming
