From b05bf588e68ba8be08e27ccdf40f97a59b17250a Mon Sep 17 00:00:00 2001 From: Ujjwal Verma Date: Sun, 3 Sep 2017 01:20:30 +0530 Subject: JS beautifier --- .../contentviews/test_js_data/simple-formatted.js | 68 ++++++++++++++++++++++ test/mitmproxy/contentviews/test_js_data/simple.js | 8 +++ 2 files changed, 76 insertions(+) create mode 100644 test/mitmproxy/contentviews/test_js_data/simple-formatted.js create mode 100644 test/mitmproxy/contentviews/test_js_data/simple.js (limited to 'test') diff --git a/test/mitmproxy/contentviews/test_js_data/simple-formatted.js b/test/mitmproxy/contentviews/test_js_data/simple-formatted.js new file mode 100644 index 00000000..7ffd7b08 --- /dev/null +++ b/test/mitmproxy/contentviews/test_js_data/simple-formatted.js @@ -0,0 +1,68 @@ +/* _GlobalPrefix_ */ +this.gbar_=this.gbar_||{}; +(function(_) { + var window=this; + +/* _Module_:sy25 */ + try { + var Mn=function(){}; + _.y(Mn,Error); + _.Nn=function() { + this.b="pending"; + this.B=[]; + this.w=this.C=void 0 + }; + _.fe(_.Nn); + var On=function() { + _.qa.call(this,"Multiple attempts to set the state of this Result") + }; + _.y(On,_.qa); + _.Nn.prototype.ta=function() { + return this.C + }; + _.Pn=function(a,c,d) { + "pending"==a.b?a.B.push( { + hb:c,scope:d||null + } + ):c.call(d,a) + }; + _.Nn.prototype.A=function(a) { + if("pending"==this.b)this.C=a,this.b="success",Qn(this); + else if(!Rn(this))throw new On; + }; + _.Nn.prototype.o=function(a) { + if("pending"==this.b)this.w=a,this.b="error",Qn(this); + else if(!Rn(this))throw new On; + }; + var Qn=function(a) { + var c=a.B; + a.B=[]; + for(var d=0;d