天天看點

js代碼壓縮/解壓程式

    把下列代碼儲存為.html直接在浏覽器中打開就能用

js代碼壓縮/解壓程式

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

js代碼壓縮/解壓程式

<html>

js代碼壓縮/解壓程式

<head>

js代碼壓縮/解壓程式

<title>Javascript Compressor</title>

js代碼壓縮/解壓程式

<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

<script type="text/javascript">

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function ICommon(that)

js代碼壓縮/解壓程式

{

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

if(that!=null)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   that.inherit=Common.prototype.inherit;

js代碼壓縮/解壓程式

   that.specialize=Common.prototype.specialize

js代碼壓縮/解壓程式

}

js代碼壓縮/解壓程式

return that

js代碼壓縮/解壓程式

};

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

ICommon.specialize=function(p,c)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

if(!p)p=

js代碼壓縮/解壓程式

{};

js代碼壓縮/解壓程式

if(!c)c=p.constructor;

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

if(c==

js代碼壓縮/解壓程式

{}.constructor) c=new Function("this.inherit()");

js代碼壓縮/解壓程式

c.valueOf=new Function("return this");

js代碼壓縮/解壓程式

c.valueOf.prototype=new this.valueOf;

js代碼壓縮/解壓程式

c.valueOf.prototype.specialize(p);

js代碼壓縮/解壓程式

c.prototype=new c.valueOf;

js代碼壓縮/解壓程式

c.valueOf.prototype.constructor=c.prototype.constructor=c;

js代碼壓縮/解壓程式

c.ancestor=this;

js代碼壓縮/解壓程式

c.specialize=arguments.callee;

js代碼壓縮/解壓程式

c.ancestorOf=this.ancestorOf;

js代碼壓縮/解壓程式

return c

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

ICommon.valueOf=new Function("return this");

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

ICommon.valueOf.prototype=

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

constructor:ICommon,inherit:function()

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   return arguments.callee.caller.ancestor.apply(this,arguments)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

},specialize:function(that)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   if(this==this.constructor.prototype&&this.constructor.specialize)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    return this.constructor.valueOf.prototype.specialize(that)

js代碼壓縮/解壓程式

   }

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   for(var i in that)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    switch(i)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     case"constructor":case"toString":case"valueOf":continue

js代碼壓縮/解壓程式

    }

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    if(typeof that[i]=="function"&&that[i]!=this[i])

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     that[i].ancestor=this[i]

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    this[i]=that[i]

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   if(that.toString!=this.toString&&that.toString!=

js代碼壓縮/解壓程式

{}.toString)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    that.toString.ancestor=this.toString;

js代碼壓縮/解壓程式

    this.toString=that.toString

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   return this

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function Common()

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

this.Common=ICommon.specialize(

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

constructor:Common,toString:function()

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   return"[common "+(this.constructor.className||"Object")+"]"

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

},instanceOf:function(klass)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   return this.constructor==klass||klass.ancestorOf(this.constructor)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

});

js代碼壓縮/解壓程式

Common.className="Common";

js代碼壓縮/解壓程式

Common.ancestor=null;

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

Common.ancestorOf=function(klass)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

while(klass&&klass.ancestor!=this) klass=klass.ancestor;

js代碼壓縮/解壓程式

return Boolean(klass)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

Common.valueOf.ancestor=ICommon;

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function ParseMaster()

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

var E=0,R=1,L=2;

js代碼壓縮/解壓程式

var G=/\(/g,S=/\$\d/,I=/^\$\d+$/,T=/(['"])\1\+(.*)\+\1\1$/,ES=/\\./g,Q=/'/,DE=/\x01[^\x01]*\x01/g;

js代碼壓縮/解壓程式

var self=this;

js代碼壓縮/解壓程式

this.add=function(e,r){

js代碼壓縮/解壓程式

   if(!r)r="";

js代碼壓縮/解壓程式

   var l=(_14(String(e)).match(G)||"").length+1;

js代碼壓縮/解壓程式

   if(S.test(r)){

js代碼壓縮/解壓程式

    if(I.test(r)){

js代碼壓縮/解壓程式

     r=parseInt(r.slice(1))-1

js代碼壓縮/解壓程式

    }else{

js代碼壓縮/解壓程式

     var i=l;

js代碼壓縮/解壓程式

     var q=Q.test(_14(r))?'"':"'";

js代碼壓縮/解壓程式

     while(i) r=r.split("$"+i--).join(q+"+a[o+"+i+"]+"+q);

js代碼壓縮/解壓程式

     r=new Function("a,o","return"+q+r.replace(T,"$1")+q)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   _33(e||"/^$/",r,l)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

this.exec=function(s)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   _3.length=0;

js代碼壓縮/解壓程式

   return _30(_5(s,this.escapeChar).replace(new RegExp(_1,this.ignoreCase?"gi":"g"),_31),this.escapeChar).replace(DE,"")

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

this.reset=function()

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   _1.length=0};

js代碼壓縮/解壓程式

   var _3=[];

js代碼壓縮/解壓程式

   var _1=[];

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   var _32=function()

js代碼壓縮/解壓程式

{ return"("+String(this[E]).slice(1,-1)+")" };

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

_1.toString=function()

js代碼壓縮/解壓程式

{return this.join("|")};

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function _33()

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   arguments.toString=_32;

js代碼壓縮/解壓程式

   _1[_1.length]=arguments

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function _31()

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   if(!arguments[0]) return"";

js代碼壓縮/解壓程式

   var i=1,j=0,p;

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   while(p=_1[j++])

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    if(arguments[i])

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     var r=p[R];

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     switch(typeof r)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

      case"function":return r(arguments,i);

js代碼壓縮/解壓程式

      case"number":return arguments[r+i]

js代碼壓縮/解壓程式

     }

js代碼壓縮/解壓程式

     var d=(arguments[i].indexOf(self.escapeChar)==-1)?"":"\x01"+arguments[i]+"\x01";

js代碼壓縮/解壓程式

     return d+r

js代碼壓縮/解壓程式

    }else i+=p[L]

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function _5(s,e)

js代碼壓縮/解壓程式

{return e?s.replace(new RegExp("\\"+e+"(.)","g"),function(m,c)

js代碼壓縮/解壓程式

{ _3[_3.length]=c; return e }):s};

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function _30(s,e)

js代碼壓縮/解壓程式

{var i=0;return e?s.replace(new RegExp("\\"+e,"g"),function()

js代碼壓縮/解壓程式

{ return e+(_3[i++]||"")}):s };

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function _14(s)

js代碼壓縮/解壓程式

{return s.replace(ES,"")}

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

ParseMaster.prototype=

js代碼壓縮/解壓程式

{ constructor:ParseMaster,ignoreCase:false,escapeChar:"" };

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

if(/MSIE 5.0/.test(navigator.userAgent)) new function()

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   var ap=function(f,o,a)

js代碼壓縮/解壓程式

{f.apply(o,a)};

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   if(''.replace(/^/,String))

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    var _28=String.prototype.replace;

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    var _29=function(e,r)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     var m,n="",s=this;

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     while(s&&(m=e.exec(s)))

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

      n+=s.slice(0,m.index)+ap(r,this,m);

js代碼壓縮/解壓程式

      s=s.slice(m.lastIndex)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     return n+s

js代碼壓縮/解壓程式

    };

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    String.prototype.replace=function(e,r)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     this.replace=(typeof r=="function")?_29:_28;

js代碼壓縮/解壓程式

     return this.replace(e,r)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   if(!Function.apply)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    var APPLY="apply-"+Number(new Date);

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    ap=function(f,o,a)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     var r;

js代碼壓縮/解壓程式

     o[APPLY]=f;

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     switch(a.length)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

      case 0:r=o[APPLY]();break;

js代碼壓縮/解壓程式

      case 1:r=o[APPLY](a[0]);break;

js代碼壓縮/解壓程式

      case 2:r=o[APPLY](a[0],a[1]);break;

js代碼壓縮/解壓程式

      case 3:r=o[APPLY](a[0],a[1],a[2]);break;

js代碼壓縮/解壓程式

      case 4:r=o[APPLY](a[0],a[1],a[2],a[3]);break;

js代碼壓縮/解壓程式

      default:var aa=[],i=a.length-1;do aa[i]="a["+i+"]";while(i--);eval("r=o[APPLY]("+aa+")")

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     delete o[APPLY];

js代碼壓縮/解壓程式

     return r

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    if(typeof ICommon=="function") ICommon.valueOf.prototype.inherit=function()

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     return ap(arguments.callee.caller.ancestor,this,arguments)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   if(![].push) Array.prototype.push=function()

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    for(var i=0;i<arguments.length;i++)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     this[this.length]=arguments[i]

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    return this.length

js代碼壓縮/解壓程式

   };

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   if(![].pop) Array.prototype.pop=function()

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    var i=this[this.length-1];

js代碼壓縮/解壓程式

    this.length--;

js代碼壓縮/解壓程式

    return i

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function pack(_7,_0,_2,_8)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   var I="$1";_7+="\n";

js代碼壓縮/解壓程式

   _0=Math.min(parseInt(_0),95);

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   function _15(s)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    var i,p;

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    for(i=0;(p=_6[i]);i++)

js代碼壓縮/解壓程式

{s=p(s)}

js代碼壓縮/解壓程式

    return s

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   var _25=function(p,a,c,k,e,d)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   while(c--) if(k[c]) p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);

js代碼壓縮/解壓程式

   return p

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

var _26=function()

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   if(!''.replace(/^/,String))

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    while(c--)d[e(c)]=k[c]||e(c);

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    k=[function(e)

js代碼壓縮/解壓程式

{return d[e]}];

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    e=function()

js代碼壓縮/解壓程式

{return'\\w+'};

js代碼壓縮/解壓程式

    c=1

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

var _6=[];

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function _4(p)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   _6[_6.length]=p

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function _18(s)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   var p=new ParseMaster;

js代碼壓縮/解壓程式

   p.escapeChar="\\";

js代碼壓縮/解壓程式

   p.add(/'[^'\n\r]*'/,I);

js代碼壓縮/解壓程式

   p.add(/"[^"\n\r]*"/,I);

js代碼壓縮/解壓程式

   p.add(/\/\/[^\n\r]*[\n\r]/," ");

js代碼壓縮/解壓程式

   p.add(/\/\*[^*]*\*+([^\/][^*]*\*+)*\//," ");

js代碼壓縮/解壓程式

   p.add(/\s+(\/[^\/\n\r\*][^\/\n\r]*\/g?i?)/,"$2");

js代碼壓縮/解壓程式

   p.add(/[^\w\x24\/'"*)\?:]\/[^\/\n\r\*][^\/\n\r]*\/g?i?/,I);

js代碼壓縮/解壓程式

   if(_8)p.add(/;;;[^\n\r]+[\n\r]/);

js代碼壓縮/解壓程式

   p.add(/\(;;\)/,I);

js代碼壓縮/解壓程式

   p.add(/;+\s*([};])/,"$2");

js代碼壓縮/解壓程式

   s=p.exec(s);

js代碼壓縮/解壓程式

   p.add(/(\b|\x24)\s+(\b|\x24)/,"$2 $3");

js代碼壓縮/解壓程式

   p.add(/([+\-])\s+([+\-])/,"$2 $3");

js代碼壓縮/解壓程式

   p.add(/\s+/,"");

js代碼壓縮/解壓程式

   return p.exec(s)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function _17(s)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   p.add(/((\x24+)([a-zA-Z_]+))(\d*)/,function(m,o)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    var l=m[o+2].length;

js代碼壓縮/解壓程式

    var s=l-Math.max(l-m[o+3].length,0);

js代碼壓縮/解壓程式

    return m[o+1].substr(s,l)+m[o+4]

js代碼壓縮/解壓程式

   });

js代碼壓縮/解壓程式

   var r=/\b_[A-Za-z\d]\w*/;

js代碼壓縮/解壓程式

   var k=_13(s,_9(r),_21);

js代碼壓縮/解壓程式

   var e=k.e;

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   p.add(r,function(m,o)

js代碼壓縮/解壓程式

{return e[m[o]]});

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function _16(s)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   if(_0>62)s=_20(s);

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   var e=_12(_0);

js代碼壓縮/解壓程式

   var r=(_0>62)?/\w\w+/ :/\w+/;

js代碼壓縮/解壓程式

   k=_13(s,_9(r),e);

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   return s&&_27(p.exec(s),k)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function _13(s,r,e)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   var a=s.match(r);

js代碼壓縮/解壓程式

   var so=[];

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   var en=

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   var pr=

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   if(a)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    var u=[];

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    var p=

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    var v=

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    var c=

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    var i=a.length,j=0,w;

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    do

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     w="$"+a[--i];

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     if(!c[w])

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

      c[w]=0;

js代碼壓縮/解壓程式

      u[j]=w;

js代碼壓縮/解壓程式

      p["$"+(v[j]=e(j))]=j++

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     c[w]++

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    while(i);

js代碼壓縮/解壓程式

    i=u.length;

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     w=u[--i];

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     if(p[w]!=null)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

      so[p[w]]=w.slice(1);

js代碼壓縮/解壓程式

      pr[p[w]]=true;

js代碼壓縮/解壓程式

      c[w]=0

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    u.sort(function(m1,m2)

js代碼壓縮/解壓程式

{return c[m2]-c[m1]});

js代碼壓縮/解壓程式

    j=0;

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

     if(so[i]==null) so[i]=u[j++].slice(1);

js代碼壓縮/解壓程式

     en[so[i]]=v[i]

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    while(++i<u.length)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   return

js代碼壓縮/解壓程式

{s:so,e:en,p:pr}

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function _27(p,k)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   var E=_10("e\\(c\\)","g");

js代碼壓縮/解壓程式

   p="'"+_5(p)+"'";

js代碼壓縮/解壓程式

   var a=Math.min(k.s.length,_0)||1;

js代碼壓縮/解壓程式

   var c=k.s.length;

js代碼壓縮/解壓程式

   for(var i in k.p) k.s[i]="";

js代碼壓縮/解壓程式

   k="'"+k.s.join("|")+"'.split('|')";

js代碼壓縮/解壓程式

   var e=_0>62?_11:_12(a);

js代碼壓縮/解壓程式

   e=String(e).replace(/_0/g,"a").replace(/arguments\.callee/g,"e");

js代碼壓縮/解壓程式

   var i="c"+(a>10?".toString(a)":"");

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   if(_2)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    var d=_19(_26);

js代碼壓縮/解壓程式

    if(_0>62)d=d.replace(/\\\\w/g,"[\\xa1-\\xff]");

js代碼壓縮/解壓程式

    else if(a<36)d=d.replace(E,i);

js代碼壓縮/解壓程式

    if(!c)d=d.replace(_10("(c)\\s*=\\s*1"),"$1=0")

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   var u=String(_25);

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

{ u=u.replace(/\

js代碼壓縮/解壓程式

{/,"{"+d+";") }

js代碼壓縮/解壓程式

   u=u.replace(/"/g,"'");

js代碼壓縮/解壓程式

   if(_0>62){ u=u.replace(/'\\\\b'\s*\+|\+\s*'\\\\b'/g,"") }

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   if(a>36||_0>62||_2){ u=u.replace(/\{/,"

js代碼壓縮/解壓程式

{e="+e+";") }else{ u=u.replace(E,i) }

js代碼壓縮/解壓程式

   u=pack(u,0,false,true);

js代碼壓縮/解壓程式

   var p=[p,a,c,k];

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   if(_2){ p=p.concat(0,"

js代碼壓縮/解壓程式

{}") }

js代碼壓縮/解壓程式

   return"eval("+u+"("+p+"))\n"

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function _12(a){return a>10?a>36?a>62?_11:_22:_23:_24};

js代碼壓縮/解壓程式

var _24=function(c){ return c };

js代碼壓縮/解壓程式

var _23=function(c){ return c.toString(36) };

js代碼壓縮/解壓程式

var _22=function(c){ return(c<_0?'':arguments.callee(parseInt(c/_0)))+((c=c%_0)>35?String.fromCharCode(c+29):c.toString(36)) };

js代碼壓縮/解壓程式

var _11=function(c){ return(c<_0?'':arguments.callee(c/_0))+String.fromCharCode(c%_0+161) };

js代碼壓縮/解壓程式

var _21=function(c){ return"_"+c };

js代碼壓縮/解壓程式

function _5(s){ return s.replace(/([\\'])/g,"\\$1") };

js代碼壓縮/解壓程式

function _20(s){ return s.replace(/[\xa1-\xff]/g,function(m){ return"\\x"+m.charCodeAt(0).toString(16) }) };

js代碼壓縮/解壓程式

function _10(s,f){ return new RegExp(s.replace(/\$/g,"\\$"),f) };

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function _19(f){ with(String(f))return slice(indexOf("

js代碼壓縮/解壓程式

{")+1,lastIndexOf("}")) };

js代碼壓縮/解壓程式

function _9(r){ return new RegExp(String(r).slice(1,-1),"g") };

js代碼壓縮/解壓程式

_4(_18);

js代碼壓縮/解壓程式

if(_8)_4(_17);

js代碼壓縮/解壓程式

if(_0)_4(_16);

js代碼壓縮/解壓程式

return _15(_7)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

var input,output;

js代碼壓縮/解壓程式

onload=function(){

js代碼壓縮/解壓程式

if(!document.getElementById||''.replace(/^/,String))return;

js代碼壓縮/解壓程式

input=document.getElementById("input");//内容 文本區域

js代碼壓縮/解壓程式

var message=document.getElementById("message");//消息 

js代碼壓縮/解壓程式

var encoding=document.getElementById("ascii-encoding");//編碼方式 選擇清單 值有0、10、62、95

js代碼壓縮/解壓程式

var fastDecode=document.getElementById("fast-decode");//快速解碼 選擇框

js代碼壓縮/解壓程式

var specialChars=document.getElementById("special-chars");//特殊字元 選擇框

js代碼壓縮/解壓程式

function packScript(){//執行壓縮

js代碼壓縮/解壓程式

   try{

js代碼壓縮/解壓程式

    if(input.value){

js代碼壓縮/解壓程式

     input.value=pack(input.value,encoding.value,fastDecode.checked,specialChars.checked);

js代碼壓縮/解壓程式

        //調用編碼函數    輸入代碼,   編碼方式,       是否快速解碼,        是否特殊字元

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

   }catch(e){

js代碼壓縮/解壓程式

    reportError("error packing script",e.message)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function decodeScript(){//執行解碼

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    if(input.value.substring(0,27)=="eval(function(p,a,c,k,e,d)

js代碼壓縮/解壓程式

{"){

js代碼壓縮/解壓程式

     eval("input.value=String"+input.value.slice(4));

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    else reportError("代碼解碼取消","您的代碼沒有用此方法壓縮!");

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

    reportError("代碼解碼錯誤",e.message)

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function enableFastDecode(){

js代碼壓縮/解壓程式

   fastDecode.disabled=Boolean(encoding.value==0);

js代碼壓縮/解壓程式

   fastDecode.parentNode.className=(encoding.value==0)?"disabled":""

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

function reportError(m,e){

js代碼壓縮/解壓程式

   message.innerHTML=m+(e?": "+e:"");

js代碼壓縮/解壓程式

   message.className="error"

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

encoding.onclick=enableFastDecode;

js代碼壓縮/解壓程式

var buttons=document.getElementsByTagName("button");

js代碼壓縮/解壓程式

var button,i;

js代碼壓縮/解壓程式

for(i=0;(button=buttons[i]);i++){

js代碼壓縮/解壓程式

   var handler=eval(button.id);

js代碼壓縮/解壓程式

   button.onclick=handler;

js代碼壓縮/解壓程式

   handler.button=button

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

</script>

js代碼壓縮/解壓程式

</head>

js代碼壓縮/解壓程式
js代碼壓縮/解壓程式

<body >

js代碼壓縮/解壓程式

<form id="packer" action="" method="post">

js代碼壓縮/解壓程式

     <label for="input">Paste your code:</label>

js代碼壓縮/解壓程式

   <br />

js代碼壓縮/解壓程式

    <textarea id="input" name="input" rows="10" cols="79"></textarea>

js代碼壓縮/解壓程式

<div class="r ar">

js代碼壓縮/解壓程式

    <p id="controls">

js代碼壓縮/解壓程式

     <label for="ascii-encoding">Encoding:</label>

js代碼壓縮/解壓程式

     <select id="ascii-encoding" name="ascii_encoding">

js代碼壓縮/解壓程式

   <option value="0">None</option>

js代碼壓縮/解壓程式

   <option value="10">Numeric</option>

js代碼壓縮/解壓程式

   <option value="62" selected="selected">Normal</option>

js代碼壓縮/解壓程式

   <option value="95">High ASCII</option>

js代碼壓縮/解壓程式

     </select><br />

js代碼壓縮/解壓程式

     <label for="fast-decode">Fast Decode:

js代碼壓縮/解壓程式

   <input type="checkbox" id="fast-decode" name="fast_decode" value="1" checked="checked"/></label><br />

js代碼壓縮/解壓程式

     <label for="special-chars">Special Characters:

js代碼壓縮/解壓程式

   <input type="checkbox" id="special-chars" name="special_chars" value="1"/></label>

js代碼壓縮/解壓程式

</p>

js代碼壓縮/解壓程式

    </div> 

js代碼壓縮/解壓程式

<button type="button" id="packScript">Compress</button>

js代碼壓縮/解壓程式

<button type="button" id="decodeScript" >Decode</button>

js代碼壓縮/解壓程式

<p id="message"></p>

js代碼壓縮/解壓程式

</form>

js代碼壓縮/解壓程式

</body>

js代碼壓縮/解壓程式

</html>

js代碼壓縮/解壓程式

界面:

輸入js代碼:

js代碼壓縮/解壓程式

Compress之後的顯示效果:

js代碼壓縮/解壓程式

PS:這段代碼是我很久前在網上找的,現在可能有更新的版本或者壓縮形式,如果有更好的,歡迎交流!

QQ:498977166

<a href="http://szw.cnblogs.com/">http://szw.cnblogs.com/</a>

研究、探讨.NET開發

轉載請注明出處和作者,謝謝!

js代碼壓縮/解壓程式

<a href="https://book.weixin.senparc.com/book/link?code=cnblogs-sign" target="_blank"></a>

<a href="https://book.weixin.senparc.com/book/link?code=cnblogs-sign" target="_blank"> </a>

繼續閱讀