这段代码,有人可以分析是什么意思?

慕容日华 发布于 2012/02/17 13:26
阅读 1K+
收藏 0

语言是javascript,这段代码看起来真是不发啊 

var STK=(function(){var a={};var b=[];a.inc=function(d,c){return true};a.register=function(e,c){var g=e.split(".");var f=a;var d=null;while(d=g.shift()){if(g.length){if(f[d]===undefined){f[d]={}}f=f[d]}else{if(f[d]===undefined){try{f[d]=c(a)}catch(h){b.push(h)}}}}};a.regShort=function(c,d){if(a[c]!==undefined){throw"["+c+"] : short : has been register"}a[c]=d};a.IE=/msie/i.test(navigator.userAgent);a.E=function(c){if(typeof c==="string"){return document.getElementById(c)}else{return c}};a.C=function(c){var d;c=c.toUpperCase();if(c=="TEXT"){d=document.createTextNode("")}else{if(c=="BUFFER"){d=document.createDocumentFragment()}else{d=document.createElement(c)}}return d};a.log=function(c){b.push("["+((new Date()).getTime()%100000)+"]: "+c)};a.getErrorLogInformationList=function(c){return b.splice(0,c||b.length)};return a})();$Import=STK.inc;STK.register("core.ani.algorithm",function(b){var a={linear:function(f,e,j,h,g){return j*f/h+e},easeincubic:function(f,e,j,h,g){return j*(f/=h)*f*f+e},easeoutcubic:function(f,e,j,h,g){if((f/=h/2)<1){return j/2*f*f*f+e}return j/2*((f-=2)*f*f+2)+e},easeinoutcubic:function(f,e,j,h,g){if(g==undefined){g=1.70158}return j*(f/=h)*f*((g+1)*f-g)+e},easeinback:function(f,e,j,h,g){if(g==undefined){g=1.70158}return j*((f=f/h-1)*f*((g+1)*f+g)+1)+e},easeoutback:function(f,e,j,h,g){if(g==undefined){g=1.70158}return j*((f=f/h-1)*f*((g+1)*f+g)+1)+e},easeinoutback:function(f,e,j,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return j/2*(f*f*(((g*=(1.525))+1)*f-g))+e}return j/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+e}};return{addAlgorithm:function(c,d){if(a[c]){throw"[core.ani.tweenValue] this algorithm :"+c+"already exist"}a[c]=d},compute:function(h,e,d,f,g,c,j){if(typeof a[h]!=="function"){throw"[core.ani.tweenValue] this algorithm :"+h+"do not exist"}return a[h](f,e,d,g,c,j)}}});STK.register("core.func.empty",function(){return function(){}});STK.register("core.obj.parseParam",function(a){return function(d,c,b){var e,f={};c=c||{};for(e in d){f[e]=d[e];if(c[e]!=null){if(b){if(d.hasOwnProperty[e]){f[e]=c[e]}}else{f[e]=c[e]}}}return f}});STK.register("core.ani.tweenArche",function(a){return function(n,o){var h,g,f,c,d,b,j,e;g={};h=a.core.obj.parseParam({animationType:"linear",distance:1,duration:500,callback:a.core.func.empty,algorithmParams:{},extra:5,delay:25},o);var m=function(){f=(+new Date()-c);if(f-1}});STK.register("core.dom.isNode",function(a){return function(b){return(b!=undefined)&&Boolean(b.nodeName)&&Boolean(b.nodeType)}});STK.register("core.json.merge",function(b){var a=function(d){if(d===undefined){return true}if(d===null){return true}if(b.core.arr.inArray(["number","string","function"],(typeof d))){return true}if(b.core.arr.isArray(d)){return true}if(b.core.dom.isNode(d)){return true}return false};var c=function(g,j,f){var h={};for(var e in g){if(j[e]===undefined){h[e]=g[e]}else{if(!a(g[e])&&!a(j[e])&&f){h[e]=arguments.callee(g[e],j[e])}else{h[e]=j[e]}}}for(var d in j){if(h[d]===undefined){h[d]=j[d]}}return h};return function(d,g,f){var e=b.core.obj.parseParam({isDeep:false},f);return c(d,g,e.isDeep)}});STK.register("core.util.color",function(f){var c=/^#([a-fA-F0-9]{3,8})$/;var e=/^rgb[a]?\s*\((\s*([0-9]{1,3})\s*,){2,3}(\s*([0-9]{1,3})\s*)\)$/;var d=/([0-9]{1,3})/ig;var a=/([a-fA-F0-9]{2})/ig;var b=f.core.arr.foreach;var g=function(m){var h=[];var j=[];if(c.test(m)){j=m.match(c);if(j[1].length<=4){h=b(j[1].split(""),function(o,n){return parseInt(o+o,16)})}else{if(j[1].length<=8){h=b(j[1].match(a),function(o,n){return parseInt(o,16)})}}return h}if(e.test(m)){j=m.match(d);h=b(j,function(o,n){return parseInt(o,10)});return h}return false};return function(m,h){var j=g(m);if(!j){return false}var n={};n.getR=function(){return j[0]};n.getG=function(){return j[1]};n.getB=function(){return j[2]};n.getA=function(){return j[3]};return n}});STK.register("core.ani.tween",function(d){var a=d.core.ani.tweenArche;var b=d.core.arr.foreach;var g=d.core.dom.getStyle;var h=d.core.func.getType;var n=d.core.obj.parseParam;var m=d.core.json.merge;var c=d.core.util.color;var f=function(r){var q=/(-?\d\.?\d*)([a-z%]*)/i.exec(r);var p=[0,"px"];if(q){if(q[1]){p[0]=q[1]-0}if(q[2]){p[1]=q[2]}}return p};var o=function(t){for(var r=0,p=t.length;r64&&q<90){var u=t.substr(0,r);var w=t.substr(r,1);var v=t.slice(r+1);return u+"-"+w.toLowerCase()+v}}return t};var j=function(u,w,r){var v=g(u,r);if(h(v)==="undefined"||v==="auto"){if(r==="height"){v=u.offsetHeight}if(r==="width"){v=u.offsetWidth}}var q={start:v,end:w,unit:"",key:r,defaultColor:false};if(h(w)==="number"){var s=[0,"px"];if(h(v)==="number"){s[0]=v}else{s=f(v)}q.start=s[0];q.unit=s[1]}if(h(w)==="string"){var p,t;p=c(w);if(p){t=c(v);if(!t){t=c("#fff")}q.start=t;q.end=p;q.defaultColor=true}}u=null;return q};var e={opacity:function(q,t,p,r){var s=(q*(p-t)+t);return{filter:"alpha(opacity="+s*100+")",opacity:Math.max(Math.min(1,s),0),zoom:"1"}},defaultColor:function(v,q,s,x,y){var p=Math.max(0,Math.min(255,Math.ceil((v*(s.getR()-q.getR())+q.getR()))));var t=Math.max(0,Math.min(255,Math.ceil((v*(s.getG()-q.getG())+q.getG()))));var w=Math.max(0,Math.min(255,Math.ceil((v*(s.getB()-q.getB())+q.getB()))));var u={};u[o(y)]="#"+(p<16?"0":"")+p.toString(16)+(t<16?"0":"")+t.toString(16)+(w<16?"0":"")+w.toString(16);return u},"default":function(s,v,p,t,r){var u=(s*(p-v)+v);var q={};q[o(r)]=u+t;return q}};return function(r,A){var u,v,p,B,C,z,D,s,t,x;A=A||{};v=n({animationType:"linear",duration:500,algorithmParams:{},extra:5,delay:25},A);v.distance=1;v.callback=(function(){var E=A.end||d.core.func.empty;return function(){B(1);D();E(r)}})();p=m(e,A.propertys||{});z=null;C={};t=[];B=function(E){var G=[];var F=b(C,function(L,J){var K;if(p[J]){K=p[J]}else{if(L.defaultColor){K=p.defaultColor}else{K=p["default"]}}var I=K(E,L.start,L.end,L.unit,L.key);for(var H in I){z.push(H,I[H])}});r.style.cssText=z.getCss()};D=function(){var E;while(E=t.shift()){try{E.fn();if(E.type==="play"){break}if(E.type==="destroy"){break}}catch(F){}}};x=a(B,v);var w=function(){if(x.getStatus()!=="play"){r=el}else{t.push({fn:w,type:"setNode"})}};var q=function(E){if(x.getStatus()!=="play"){C=b(E,function(G,F){return j(r,G,F)});z=d.core.dom.cssText(r.style.cssText+(A.staticStyle||""));x.play()}else{t.push({fn:function(){q(E)},type:"play"})}};var y=function(){if(x.getStatus()!=="play"){x.destroy();r=null;u=null;v=null;p=null;B=null;C=null;z=null;D=null;s=null;t=null}else{t.push({fn:y,type:"destroy"})}};u={};u.play=function(E){q(E);return u};u.stop=function(){x.stop();return u};u.pause=function(){x.pause();return u};u.resume=function(){x.resume();return u};u.finish=function(E){q(E);y();return u};u.setNode=function(E){w();return u};u.destroy=function(){y();return u};return u}});STK.register("core.arr.findout",function(a){return function(f,e){if(!a.core.arr.isArray(f)){throw"the findout function needs an array as first parameter"}var c=[];for(var d=0,b=f.length;d+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,m=0,d=Object.prototype.toString,s=false,j=true;[0,0].sort(function(){j=false;return 0});var b=function(z,e,C,D){C=C||[];e=e||document;var F=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!z||typeof z!=="string"){return C}var A=[],w,H,K,v,y=true,x=b.isXML(e),E=z,G,J,I,B;do{t.exec("");w=t.exec(E);if(w){E=w[3];A.push(w[1]);if(w[2]){v=w[3];break}}}while(w);if(A.length>1&&o.exec(z)){if(A.length===2&&f.relative[A[0]]){H=h(A[0]+A[1],e)}else{H=f.relative[A[0]]?[e]:b(A.shift(),e);while(A.length){z=A.shift();if(f.relative[z]){z+=A.shift()}H=h(z,H)}}}else{if(!D&&A.length>1&&e.nodeType===9&&!x&&f.match.ID.test(A[0])&&!f.match.ID.test(A[A.length-1])){G=b.find(A.shift(),e,x);e=G.expr?b.filter(G.expr,G.set)[0]:G.set[0]}if(e){G=D?{expr:A.pop(),set:a(D)}:b.find(A.pop(),A.length===1&&(A[0]==="~"||A[0]==="+")&&e.parentNode?e.parentNode:e,x);H=G.expr?b.filter(G.expr,G.set):G.set;if(A.length>0){K=a(H)}else{y=false}while(A.length){J=A.pop();I=J;if(!f.relative[J]){J=""}else{I=A.pop()}if(I==null){I=e}f.relative[J](K,I,x)}}else{K=A=[]}}if(!K){K=H}if(!K){b.error(J||z)}if(d.call(K)==="[object Array]"){if(!y){C.push.apply(C,K)}else{if(e&&e.nodeType===1){for(B=0;K[B]!=null;B++){if(K[B]&&(K[B]===true||K[B].nodeType===1&&b.contains(e,K[B]))){C.push(H[B])}}}else{for(B=0;K[B]!=null;B++){if(K[B]&&K[B].nodeType===1){C.push(H[B])}}}}}else{a(K,C)}if(v){b(v,F,C,D);b.uniqueSort(C)}return C};b.uniqueSort=function(v){if(c){s=j;v.sort(c);if(s){for(var e=1;e":function(A,v){var y=typeof v==="string",z,w=0,e=A.length;if(y&&!/\W/.test(v)){v=v.toLowerCase();for(;w=0)){if(!w){e.push(z)}}else{if(w){v[y]=false}}}}return false},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(v,e){return v[1].toLowerCase()},CHILD:function(e){if(e[1]==="nth"){var v=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(v[1]+(v[2]||1))-0;e[3]=v[3]-0}e[0]=m++;return e},ATTR:function(y,v,w,e,z,A){var x=y[1].replace(/\\/g,"");if(!A&&f.attrMap[x]){y[1]=f.attrMap[x]}if(y[2]==="~="){y[4]=" "+y[4]+" "}return y},PSEUDO:function(y,v,w,e,z){if(y[1]==="not"){if((t.exec(y[3])||"").length>1||/^\w/.test(y[3])){y[3]=b(y[3],null,null,v)}else{var x=b.filter(y[3],v,w,true^z);if(!w){e.push.apply(e,x)}return false}}else{if(f.match.POS.test(y[0])||f.match.CHILD.test(y[0])){return true}}return y},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){e.parentNode.selectedIndex;return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(w,v,e){return !!b(e[3],w).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toLowerCase()==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)}},setFilters:{first:function(v,e){return e===0},last:function(w,v,e,x){return v===x.length-1},even:function(v,e){return e%2===0},odd:function(v,e){return e%2===1},lt:function(w,v,e){return ve[3]-0},nth:function(w,v,e){return e[3]-0===v},eq:function(w,v,e){return e[3]-0===v}},filter:{PSEUDO:function(w,B,A,C){var e=B[1],v=f.filters[e];if(v){return v(w,A,B,C)}else{if(e==="contains"){return(w.textContent||w.innerText||b.getText([w])||"").indexOf(B[3])>=0}else{if(e==="not"){var x=B[3];for(var z=0,y=x.length;z=0)}}},ID:function(v,e){return v.nodeType===1&&v.getAttribute("id")===e},TAG:function(v,e){return(e==="*"&&v.nodeType===1)||v.nodeName.toLowerCase()===e},CLASS:function(v,e){return(" "+(v.className||v.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(z,x){var w=x[1],e=f.attrHandle[w]?f.attrHandle[w](z):z[w]!=null?z[w]:z.getAttribute(w),A=e+"",y=x[2],v=x[4];return e==null?y==="!=":y==="="?A===v:y==="*="?A.indexOf(v)>=0:y==="~="?(" "+A+" ").indexOf(v)>=0:!v?A&&e!==false:y==="!="?A!==v:y==="^="?A.indexOf(v)===0:y==="$="?A.substr(A.length-v.length)===v:y==="|="?A===v||A.substr(0,v.length+1)===v+"-":false},POS:function(y,v,w,z){var e=v[2],x=f.setFilters[e];if(x){return x(y,w,v,z)}}}};b.selectors=f;var o=f.match.POS,g=function(v,e){return"\\"+(e-0+1)};for(var q in f.match){f.match[q]=new RegExp(f.match[q].source+(/(?![^\[]*\])(?![^\(]*\))/.source));f.leftMatch[q]=new RegExp(/(^(?:.|\r|\n)*?)/

加载中
0
羅立安的眼光
羅立安的眼光
这代码是给人类看的吗...
0
开源中国首席攻城师
开源中国首席攻城师

人类表示看不懂。。。

0
苦行瓜
苦行瓜
最讨厌一大坨一大坨的代码了。
0
pyawen
pyawen
sina 微博的  
0
王国柱
王国柱

都是人才呐

0
IdleMan
IdleMan
这代码是经过压缩处理了,给机器执行的
0
Liuxd
Liuxd
找个工具解压了再说吧,这不是给人看的。
0
pyawen
pyawen
格式化一下就可以了    有很多html js 格式化工具的
0
antipro
antipro
代码全部混淆过了,格式化以后恐怕也很难看懂。
antipro
antipro
@pyawen : 变量都变成a b c d了还不是混淆?
pyawen
pyawen
上面的代码并没有混淆
0
战争总会来临
战争总会来临
压缩了,局部变量被替换成了a,b,c,d...
返回顶部
顶部