Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can compressed javascript be uncompressed

Is it possible to uncompress (if that's the right term even) for code like below?

var vote=function(){var k={informModerator:-1,undoMod:0,acceptedByOwner:1,upMod:2,downMod:3,offensive:4,favorite:5,close:6,reopen:7,deletion:10,undeletion:11,spam:12};var f=imagePath+"vote-arrow-down.png";var c=imagePath+"vote-arrow-down-on.png";var x=imagePath+"vote-arrow-up.png";var w=imagePath+"vote-arrow-up-on.png";var A=imagePath+"vote-favorite-on.png";var o=imagePath+"vote-favorite-off.png";var l=function(){var C='<a href="/users/login?returnurl='+escape(document.location)+'">login or register</a>';$("div.vote").find("img").not(".vote-accepted").unbind("click").click(function(D){u($(D.target),"Please "+C+" to use voting.")});z().unbind("click").click(function(D){u($(D.target),"Please "+C+" to flag this post.")})};var B=function(C){if(!C){C="div.vote"}$(C).find("img.vote-

I did search stackoverflow for this question and found no results

like image 605
JasonDavis Avatar asked Jul 27 '09 21:07

JasonDavis


1 Answers

Yes. Copy / paste here: http://jsbeautifier.org/

That will only reformat the layout. You cannot restore variable/function names.

Related on MetaSO: Can we get an un-obfuscated version of the vote object?

like image 113
Sampson Avatar answered Nov 16 '22 03:11

Sampson