You know how those packed js files look like, right?
eval(function(p,a,c,k,e,d){ ... } ('obfuscated-string'.split('|'),0,{}))
It just so happens to be that i have to tweak some large legacy code that looks like that and I want to find a way to turn this into a more readable version.
If that's not possible, can i at least get rid of the eval?
Open Notepad or TextEdit, open the template folder, then drag the . js file into Notepad or TextEdit and drop it. Open Notepad or TextEdit, select "file" then "open", browse to the template folder, select "all file types" and open the . js file that way.
Editing JavaScript code in real-time is possible in Chrome and Chromium based browsers. After loading a web page completely, press the F12 key to open the developer tools, then open the 'Sources' tab. Now open any Javascript file loaded on the browser and you can directly edit it by clicking anywhere in that file.
You should put your JS code in a separate file because this makes it easier to test and develop. The question of how you serve the code is a different matter. Serving the HTML and the JS separately has the advantage that a client can cache the JS.
JS Beautifier will both reformat and unpack:
http://jsbeautifier.org/
You can with online unpackers: try one of these, find one that suits you:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With