What is this strange javascript use for? [closed] - javascript

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
I am not sure if I can ask this question here but:
I have a JavaScript block which I don't understand:
var _0x3a04=["$(3C).4Z(2(){3 o=\x2218\x22,y=\x224r\x22,u=\x223F.\x22,s=\x223v\x22,t=\x22.3D\x22,x=\x223G\x22,w=\x223o\x22,q=\x22.m\x22,p=\x222s\x22,l=q+p,v=\x224H\x22,z=\x223q\x22,r=\x223B\x22;5($(\x22.2s\x22+y+\x22x\x22).1d(\x22a\x22).2M(o)==\x221g://\x22+u+\x22i\x22+s+\x22h\x22+r+\x22s.1D\x22\x26\x26$(\x22.2s\x22+y+\x22x\x22).1d(l).2M(o)==\x221g://\x22+x+\x22r-s\x22+w+\x22.3t\x22+v+\x22t\x22+t+\x22m\x22){1m.3A=(2(){3 a=2(c){3 f=c||{},b=f.1Z||1m.21.2a,g=f.3k||\x221g://1.2q.2g.1D/-2w/2x/2y/2C/2E/2H.2o\x22,d=f.4C||50,e=f.3m||0;(2(j){3 h=j(\x22#1E-2n-3y\x22),k=h.1d(\x22:2m\x22);h.2A(\x27\x3C12 3E=\x222n-1x\x22\x3E\x3C/12\x3E\x27);3 i=j(\x22#2n-1x\x22);h.2F(\x223H\x22,2(){3 m=k.4i();i.4q().15(\x221M...\x22);j.1E({1w:\x221g://\x22+b+\x22/1O/2l/1C?1v=1X-1f-20\x26q=\x22+m+\x22\x262k-22=2B\x22,1s:\x2224\x22,26:\x2227\x22,28:2(I){3 H=I.1B.2e,E,D,G,F,A=\x22\x22;5(H!==1Q){A=\x22\x3C1r\x3E3w 22 1a 3z \x262D;\x22+m+\x22\x262D;\x3C/1r\x3E\x22;A+=\x27\x3Ca 11=\x221U\x22 18=\x22/\x22\x3E\x262j;\x3C/a\x3E\x3C2J\x3E\x27;1a(3 C=0;C\x3CH.16;C++){3 n=46 4a(m,\x224f\x22),G=H[C].1G.$t.1i(n,\x22\x3C25\x3E\x22+m+\x22\x3C/25\x3E\x22);1a(3 B=0;B\x3CH[C].14.16;B++){5(H[C].14[B].1n==\x2229\x22){F=H[C].14[B].18}}5(\x221A\x221f H[C]){E=H[C].1A.$t}17{5(\x221C\x221f H[C]){E=H[C].1C.$t}17{E=\x22\x22}}E=E.1i(/\x3C\x5CS[^\x3E]*\x3E/g,\x22\x22);5(E.16\x3Ee){E=E.1y(0,e)+\x22...\x22}E=E.1i(n,\x22\x3C25\x3E\x22+m+\x22\x3C/25\x3E\x22);5(\x222f$1H\x221f H[C]){D=H[C].2f$1H.1w.1i(/\x5C/s[0-9]+\x5C-c/g,\x22/s\x22+d+\x22-c\x22)}17{D=g}A+=\x27\x3C7\x3E\x3Ca 18=\x22\x27+F+\x27\x22 1K=\x221L\x22\x3E\x3C13\x3E\x3C1N 2p=\x22\x27+d+\x27\x22 1b=\x22\x27+d+\x27\x22 1P=\x22\x27+D+\x27\x22/\x3E\x3C/13\x3E\x3Cb\x3E\x27+G+\x22\x3C/b\x3E\x3C/a\x3E\x3Cp\x3E\x22+E+\x22\x3C/p\x3E\x3C/7\x3E\x22}A+=\x22\x3C/2J\x3E\x22;i.15(A)}17{i.15(\x27\x3Ca 11=\x221U\x22 18=\x22/\x22\x3E\x262j;\x3C/a\x3E\x3C1h\x3E1R 1x!\x3C/1h\x3E\x27)}},1S:2(){i.15(\x27\x3Ca 11=\x221U\x22 18=\x22/\x22\x3E\x262j;\x3C/a\x3E\x3C1h\x3E1T 4p 1B.\x3C/1h\x3E\x27)}});1j 1t});h.2F(\x224s\x22,\x22.1U\x22,2(){i.4x();1j 1t})})(1c)};1j 2(b){a(b)}})();1m.4D=(2(){3 a=2(A){3 d=A||{},h=d.1Z||1m.21.2a,n=d.4G||8,g=d.3f||\x22#3g\x22,e=d.3h||3i,c=d.3j||1W,f=d.3l||4,b=d.3n||2G,m=d.3p||1Y,j=d.3r||1t,k=d.3s||\x222I\x22,i=d.3u||\x221g://1.2q.2g.1D/-2w/2x/2y/2C/2E/2H.2o\x22;$.1E({1w:\x221g://\x22+h+\x22/1O/2l/2h?1v=1X-1f-20\x262k-22=\x22+n+\x22\x22,1s:\x2224\x22,26:\x2227\x22,28:2(G){3 I,B,H,K,M,J,D=\x22\x22,L=G.1B.2e;5(L!==1Q){5(j){D=\x22\x3C1e 11=\x272U 2V\x27\x3E\x22}17{D=\x22\x3C1e 11=\x272V\x27\x3E\x22}1a(3 F=0;F\x3CL.16;F++){1a(3 E=0;E\x3CL[F].14.16;E++){5(L[F].14[E].1n==\x2229\x22){I=L[F].14[E].18;1q}}1a(3 C=0;C\x3CL[F].14.16;C++){5(L[F].14[C].1n==\x222Y\x22\x26\x26L[F].14[C].1s==\x222m/15\x22){H=L[F].14[C].1G.30(\x22 \x22)[0];1q}}5(\x221A\x221f L[F]){K=L[F].1A.$t}17{5(\x221C\x221f L[F]){K=L[F].1C.$t}17{K=\x22\x22}}5(\x222f$1H\x221f L[F]){M=L[F].2f$1H.1w.1i(/\x5C/s[0-9]+\x5C-c/g,\x22/s\x22+e+\x22-c\x22)}17{M=i}K=K.1i(/\x3C\x5CS[^\x3E]*\x3E/g,\x22\x22);5(K.16\x3Ec){K=K.1y(0,c)+\x22...\x22}B=L[F].1G.$t;J=L[F].31.$t.1y(0,10),J=J.1i(/-/g,\x22/\x22);D+=\x27\x3C7\x3E\x3C12 11=\x2247\x22\x3E\x3Ca 18=\x22\x27+I+\x27\x22 1K=\x221L\x22\x3E\x3C13\x3E\x3C1N 1v=\x22\x27+B+\x27\x221P=\x22\x27+M+\x27\x22/\x3E\x3C/13\x3E\x3C/a\x3E\x3C/12\x3E\x3C12 11=\x2248\x22\x3E\x3C1r\x3E\x3Ca 18=\x22\x27+I+\x27\x22 1K=\x221L\x22\x3E\x27+B+\x27\x3C/a\x3E\x3C/1r\x3E\x3C12 11=\x2236\x22\x3E\x3C13 11=\x2237\x22\x3E\x27+J+\x27\x3C/13\x3E\x3C13 11=\x223a\x22\x3E\x27+H+\x22 \x22+k+\x27\x3C/13\x3E\x3C/12\x3E\x3C/12\x3E\x3C12 11=\x224o\x22\x3E\x27+K+\x22\x3C/12\x3E\x3C/7\x3E\x22}D+=\x22\x3C/1e\x3E\x22;$(g).15(D);(2(N){N.2u.2v=2(O,Q,P){O=O||4;Q=Q||2z;P=P||1Y;1j 19.2b(2(){3 X=N(19),W=1F,V=[],U=O,R=X.1d(\x22\x3E 7:2i\x22).1b(),T=0;2 S(){5(W){3 Y=N(V[U]).1u({1b:0,1o:0}).2K(X);X.1d(\x22\x3E 7:2L\x22).1p({1o:0},P,2(){Y.1p({1b:R},P).1p({1o:1},P);N(19).23()});U++;5(U\x3E=T){U=0}}2N(S,Q)}X.1d(\x22\x3E 7\x22).2b(2(){V.2O(\x22\x3C7\x3E\x22+N(19).15()+\x22\x3C/7\x3E\x22)});T=V.16;X.2P(\x27\x3C12 11=\x223x\x22 /\x3E\x27).2Q().1u({1b:R*O});X.1d(\x22\x3E 7\x22).2R(\x22:2S(\x22+(O-1)+\x22)\x22).23();X.1k(\x221J\x22,2(){W=1t}).1k(\x221I\x22,2(){W=1F});S()})}})(1c);1c(2(){5(j){1c(\x221e.2U\x22).2v(f,b,m).1k(\x222W\x22,2(){1c(19).2c(\x221J\x22)}).1k(\x222X\x22,2(){1c(19).2c(\x221I\x22)})}})}17{$(g).15(\x22\x3C13\x3E1R 1x!\x3C/13\x3E\x22)}},1S:2(){$(g).15(\x22\x3C1h\x3E1T 1M 2r!\x3C/1h\x3E\x22)}})};1j 2(b){a(b)}})();1m.3I=(2(){3 a=2(B){3 e=B||{},k=e.1Z||1m.21.2a,c=e.3J||\x22#3K\x22,m=e.3L||6,j=e.3M||3N,i=e.3O||1t,b=e.3P||4,h=e.3Q||2G,g=e.3R||1Y,f=e.3S||1W,A=e.3T||\x221g://4.2q.2g.1D/-3U/3V/3W/3X/3Y/3Z-40-41.42\x22,n=e.43||50,d=e.44||\x22\x22;$.1E({1w:\x221g://\x22+k+\x22/1O/45/2h?1v=1X-1f-20\x22,1s:\x2224\x22,26:\x2227\x22,28:2(Q){3 I,K=Q.1B.2e;5(K!==1Q){I=\x22\x3C1e 11=\x272Z\x27\x3E\x22;1V=0;1a(3 H=0;H\x3Cn;H++){3 G,M,J,C,L,E;5(H==K.16){1q}5(1V\x3E=m){1q}3 P=K[H];1a(3 F=0;F\x3CP.14.16;F++){5(P.14[F].1n==\x2229\x22){G=P.14[F].18}}1a(3 O=0;O\x3CP.1z.16;O++){M=P.1z[O].49.$t;J=P.1z[O].32$4b.1P}5(M!=d\x26\x261V\x3Cm){1V++;I+=\x22\x3C7\x3E\x22;5(J==\x221g://4c.4d.1D/1N/4e.2o\x22){C=A}17{C=J.1i(/\x5C/s[0-9]+(\x5C-c|\x5C/)/,\x22/s\x22+j+\x22$1\x22)}3 E=(P.1z[0].33)?P.1z[0].33.$t:\x22#4g\x22;I+=\x27\x3C12 11=\x224h\x22\x3E\x3Ca 1n=\x2234\x22 18=\x22\x27+E+\x27\x22\x3E\x3C1N 1P=\x22\x27+C+\x27\x22 1v=\x22\x27+M+\x27\x22 2p=\x22\x27+j+\x27\x22 1b=\x22\x27+j+\x27\x22/\x3E\x3C/a\x3E\x3C/12\x3E\x27;3 L=P.32$4j[1].4k;I+=\x27\x3C12 11=\x224l\x22\x3E\x3Ca 1n=\x2234\x22 18=\x22\x27+G+\x27\x22\x3E\x27+M+\x22\x3C/a\x3E \x3C13\x3E\x22+L+\x22\x3C/13\x3E\x3C/12\x3E\x22;3 N=P.1A.$t;3 D=N.1i(/(\x3C([^\x3E]+)\x3E)/4m,\x22\x22);5(D!=\x22\x22\x26\x26D.16\x3Ef){D=D.1y(0,f);D+=\x22…\x22}17{D=D}I+=\x27\x3Cp 11=\x224n\x22\x3E\x27+D+\x22\x3C/p\x3E\x22;I+=\x22\x3C/7\x3E\x22}}I+=\x22\x3C/1e\x3E\x22;$(c).15(I);(2(R){R.2u.35=2(S,U,T){S=S||4;U=U||2z;T=T||1Y;1j 19.2b(2(){3 1l=R(19),2d=1F,Z=[],Y=S,V=1l.1d(\x22\x3E 7:2i\x22).1b(),X=0;2 W(){5(2d){3 38=R(Z[Y]).1u({1b:0,1o:0}).2K(1l);1l.1d(\x22\x3E 7:2L\x22).1p({1o:0},T,2(){38.1p({1b:V},T).1p({1o:1},T);R(19).23()});Y++;5(Y\x3E=X){Y=0}}2N(W,U)}1l.1d(\x22\x3E 7\x22).2b(2(){Z.2O(\x22\x3C7\x3E\x22+R(19).15()+\x22\x3C/7\x3E\x22)});X=Z.16;1l.2P(\x27\x3C12 11=\x224t\x22 /\x3E\x27).2Q().1u({1b:V*S});1l.1d(\x22\x3E 7\x22).2R(\x22:2S(\x22+(S-1)+\x22)\x22).23();1l.1k(\x221J\x22,2(){2d=1t}).1k(\x221I\x22,2(){2d=1F});W()})}})(1c);1c(2(){5(i){1c(\x221e.2Z\x22).35(b,h,g).1k(\x222W\x22,2(){1c(19).2c(\x221J\x22)}).1k(\x222X\x22,2(){1c(19).2c(\x221I\x22)})}})}17{$(c).15(\x22\x3C13\x3E1R 1x!\x3C/13\x3E\x22)}},1S:2(){$(c).15(\x22\x3C1h\x3E1T 1M 2r!\x3C/1h\x3E\x22)}})};1j 2(b){a(b)}})();1m.4u=(2(){3 a=2(d){3 g=d||{},b=g.1Z||1m.21.2a,f=g.4v||8,e=g.4w||\x22#2t\x22,h=g.4y||1F,c=g.4z||\x222I\x22;$.1E({1w:\x221g://\x22+b+\x22/1O/2l/2h?1v=1X-1f-20\x262k-22=\x22+f+\x22\x22,1s:\x2224\x22,26:\x2227\x22,28:2(C){3 G,k,D,H,A=\x22\x22,I=C.1B.2e;5(I!==1Q){A=\x22\x3C1e\x3E\x22;1a(3 E=0;E\x3CI.16;E++){1a(3 B=0;B\x3CI[E].14.16;B++){5(I[E].14[B].1n==\x2229\x22){G=I[E].14[B].18;1q}}1a(3 m=0;m\x3CI[E].14.16;m++){5(I[E].14[m].1n==\x222Y\x22\x26\x26I[E].14[m].1s==\x222m/15\x22){D=I[E].14[m].1G.30(\x22 \x22)[0];1q}}k=I[E].1G.$t;H=I[E].31.$t.1y(0,10);H=H.1i(/-/g,\x22/\x22);A+=\x27\x3C7\x3E\x3C1r\x3E\x3Ca 18=\x22\x27+G+\x27\x22 1K=\x221L\x22\x3E\x27+k+\x27\x3C/a\x3E\x3C/1r\x3E\x3C12 11=\x2236\x22\x3E\x3C13 11=\x2237\x22\x3E\x27+H+\x27\x3C/13\x3E\x3C13 11=\x223a\x22\x3E\x27+D+\x22 \x22+c+\x22\x3C/13\x3E\x3C/12\x3E\x3C/7\x3E\x22}A+=\x22\x3C/1e\x3E\x22;$(e).15(A);5(h){2 F(){$(\x22#2t 1e 7:2i\x22).1p({1o:0},4A,2(){$(19).4B($(\x22#2t 1e\x22)).1u(\x221o\x22,1)})}3 n=3b(2(){F()},3c);$(e).4E(2(){4F(n)},2(){3b(2(){F()},3c)})}}17{$(e).15(\x22\x3C13\x3E1R 1x!\x3C/13\x3E\x22)}},1S:2(){$(e).15(\x22\x3C1h\x3E1T 1M 2r!\x3C/1h\x3E\x22)}})};1j 2(b){a(b)}})()}17{$(z).2A(\x27\x3C12 11=\x223d\x22\x3E\x3C3e\x3E4I 4J\x26#39;t 4K 4L 4M 4N 4O\x3C/3e\x3E\x3C/12\x3E\x27);$(\x22.3d\x22).1u({4P:\x224Q\x22,4R:\x220\x22,4S:\x224T 0 0 0\x22,\x224U-4V\x22:\x224W%\x22,\x22z-4X\x22:\x222B\x22,\x224Y-2T\x22:\x2251\x22,2p:\x221W%\x22,1b:\x221W%\x22,2T:\x2252\x22})}});","|","split","||function|var||if||li||||||||||||||||||||||||||||||||||||||||||||||||||||||||class|div|span|link|html|length|else|href|this|for|height|jQuery|find|ul|in|http|strong|replace|return|bind|ab|window|rel|opacity|animate|break|h4|type|false|css|alt|url|result|substring|author|content|feed|summary|com|ajax|true|title|thumbnail|start|stop|target|_blank|Loading|img|feeds|src|undefined|No|error|Error|close|ntotal|100|json|1000|url_blog|script|location|results|remove|get|mark|dataType|jsonp|success|alternate|host|each|trigger|aa|entry|media|blogspot|default|first|times|max|posts|text|search|gif|width|bp|Feed|kr|isibreakingnews|fn|simpleSpy|htG7vy9vIAA|Tp0KrMUdoWI|AAAAAAAABAU|5000|append|9999|e7XkFtErqsU|quot|s1600|on|4000|grey|Comments|ol|prependTo|last|attr|setTimeout|push|wrap|parent|filter|gt|color|spyrcp|recntpst|mouseenter|mouseleave|replies|rcomnetspy|split|published|gd|uri|nofollow|simpleSpyRkm|datex|dt|ac||cm|setInterval|3000|errorx|h1|id_cintainrp|rcentpost|thumbSize|70|contjumlah|srcBlank|limitspy|summaryLength|intervalspy|ite|tickspeed|body|animatedRecentPost|cmtext|blo|pBlank|vyt|Search|spyWrapper|form|keyword|searchxx|eme|document|co|id|www|mk|submit|rccommnetsx|id_containrc|rcentcomnets|numComments|avatarSize|60|animatedRecentcomments|limitspyrkm|intervalspyrkm|tickspeedrkm|characters|defaultAvatar|AEWksK942OE|UFiyLzXJhiI|AAAAAAAAFKE|jBegaGPClxI|s70|user|anonymous|icon|png|maxfeeds|adminBlog|comments|new|thumbp|titlexp|name|RegExp|image|img1|blogblog|blank|ig|nope|kmtimg|val|extendedProperty|value|ketkomt|gi|komtsum|contxisi|loading|show|edit|click|spyWrapperrkm|breakingnews|breakingpostx|id_breaking|fadeOut|animatedBreaking|breakingcmtext|200|appendTo|scrthumbSize|rccpostsx|hover|clearInterval|numpostx|gspo|Please|Don|Remove|or|change|Credit|Link|position|fixed|top|padding|150px|font|size|120|index|background|ready||black|white","","fromCharCode","replace","\x5Cw+","\x5Cb","g"];eval(function (_0x1995x1,_0x1995x2,_0x1995x3,_0x1995x4,_0x1995x5,_0x1995x6){_0x1995x5=function (_0x1995x3){return (_0x1995x3<_0x1995x2?_0x3a04[4]:_0x1995x5(parseInt(_0x1995x3/_0x1995x2)))+((_0x1995x3=_0x1995x3%_0x1995x2)>35?String[_0x3a04[5]](_0x1995x3+29):_0x1995x3.toString(36));} ;if(!_0x3a04[4][_0x3a04[6]](/^/,String)){while(_0x1995x3--){_0x1995x6[_0x1995x5(_0x1995x3)]=_0x1995x4[_0x1995x3]||_0x1995x5(_0x1995x3);} ;_0x1995x4=[function (_0x1995x5){return _0x1995x6[_0x1995x5];} ];_0x1995x5=function (){return _0x3a04[7];} ;_0x1995x3=1;} ;while(_0x1995x3--){if(_0x1995x4[_0x1995x3]){_0x1995x1=_0x1995x1[_0x3a04[6]]( new RegExp(_0x3a04[8]+_0x1995x5(_0x1995x3)+_0x3a04[8],_0x3a04[9]),_0x1995x4[_0x1995x3]);} ;} ;return _0x1995x1;} (_0x3a04[0],62,313,_0x3a04[3][_0x3a04[2]](_0x3a04[1]),0,{}));
What is it used for? How can such code be written?

That's obfuscated JavaScript.
If you don't know, where it is coming from, it is most likely your site was hacked and this JavaScript is malicious!
What is it used for? How can such code be written?
It is used to hide your code. The reason may be different: Some think they can protect their own code by such things. This, however, is futile as you can see below. Another usecase is for hackers to hide their code from detection. People who often use scripts found on the internet might not see, that this code is invalid and think it is part of some script they wanted to use. Furthermore it hinders the automatic detection of malicious scripts for the same reasons.
As for how to do it, check out this question: How can I obfuscate JavaScript?
The somehow un-obfuscated code:
$(document).ready(function () {
var o = "href",
y = "edit",
u = "www.",
s = "vyt",
t = ".co",
x = "mk",
w = "ite",
q = ".m",
p = "kr",
l = q + p,
v = "gspo",
z = "body",
r = "eme";
if ($(".kr" + y + "x").find("a").attr(o) == "http://" + u + "i" + s + "h" + r + "s.com" && $(".kr" + y + "x").find(l).attr(o) == "http://" + x + "r-s" + w + ".blo" + v + "t" + t + "m") {
window.searchxx = (function () {
var a = function (c) {
var f = c || {}, b = f.url_blog || window.location.host,
g = f.srcBlank || "http://1.bp.blogspot.com/-htG7vy9vIAA/Tp0KrMUdoWI/AAAAAAAABAU/e7XkFtErqsU/s1600/grey.gif",
d = f.scrthumbSize || 50,
e = f.summaryLength || 0;
(function (j) {
var h = j("#ajax-search-form"),
k = h.find(":text");
h.append('<div id="search-result"></div>');
var i = j("#search-result");
h.on("submit", function () {
var m = k.val();
i.show().html("Loading...");
j.ajax({
url: "http://" + b + "/feeds/posts/summary?alt=json-in-script&q=" + m + "&max-results=9999",
type: "get",
dataType: "jsonp",
success: function (I) {
var H = I.feed.entry,
E, D, G, F, A = "";
if (H !== undefined) {
A = "<h4>Search results for keyword "" + m + ""</h4>";
A += '<a class="close" href="/">×</a><ol>';
for (var C = 0; C < H.length; C++) {
var n = new RegExp(m, "ig"),
G = H[C].title.$t.replace(n, "<mark>" + m + "</mark>");
for (var B = 0; B < H[C].link.length; B++) {
if (H[C].link[B].rel == "alternate") {
F = H[C].link[B].href
}
}
if ("content" in H[C]) {
E = H[C].content.$t
} else {
if ("summary" in H[C]) {
E = H[C].summary.$t
} else {
E = ""
}
}
E = E.replace(/<\S[^>]*>/g, "");
if (E.length > e) {
E = E.substring(0, e) + "..."
}
E = E.replace(n, "<mark>" + m + "</mark>");
if ("media$thumbnail" in H[C]) {
D = H[C].media$thumbnail.url.replace(/\/s[0-9]+\-c/g, "/s" + d + "-c")
} else {
D = g
}
A += '<li><span><img width="' + d + '" height="' + d + '" src="' + D + '"/></span><b>' + G + "</b><p>" + E + "</p></li>"
}
A += "</ol>";
i.html(A)
} else {
i.html('<a class="close" href="/">×</a><strong>No result!</strong>')
}
},
error: function () {
i.html('<a class="close" href="/">×</a><strong>Error loading feed.</strong>')
}
});
return false
});
h.on("click", ".close", function () {
i.fadeOut();
return false
})
})(jQuery)
};
return function (b) {
a(b)
}
})();
window.rccpostsx = (function () {
var a = function (A) {
var d = A || {}, h = d.url_blog || window.location.host,
n = d.numpostx || 8,
g = d.id_cintainrp || "#rcentpost",
e = d.thumbSize || 70,
c = d.contjumlah || 100,
f = d.limitspy || 4,
b = d.intervalspy || 4000,
m = d.tickspeed || 1000,
j = d.animatedRecentPost || false,
k = d.cmtext || "Comments",
i = d.pBlank || "http://1.bp.blogspot.com/-htG7vy9vIAA/Tp0KrMUdoWI/AAAAAAAABAU/e7XkFtErqsU/s1600/grey.gif";
$.ajax({
url: "http://" + h + "/feeds/posts/default?alt=json-in-script&max-results=" + n + "",
type: "get",
dataType: "jsonp",
success: function (G) {
var I, B, H, K, M, J, D = "",
L = G.feed.entry;
if (L !== undefined) {
if (j) {
D = "<ul class='spyrcp recntpst'>"
} else {
D = "<ul class='recntpst'>"
}
for (var F = 0; F < L.length; F++) {
for (var E = 0; E < L[F].link.length; E++) {
if (L[F].link[E].rel == "alternate") {
I = L[F].link[E].href;
break
}
}
for (var C = 0; C < L[F].link.length; C++) {
if (L[F].link[C].rel == "replies" && L[F].link[C].type == "text/html") {
H = L[F].link[C].title.split(" ")[0];
break
}
}
if ("content" in L[F]) {
K = L[F].content.$t
} else {
if ("summary" in L[F]) {
K = L[F].summary.$t
} else {
K = ""
}
}
if ("media$thumbnail" in L[F]) {
M = L[F].media$thumbnail.url.replace(/\/s[0-9]+\-c/g, "/s" + e + "-c")
} else {
M = i
}
K = K.replace(/<\S[^>]*>/g, "");
if (K.length > c) {
K = K.substring(0, c) + "..."
}
B = L[F].title.$t;
J = L[F].published.$t.substring(0, 10), J = J.replace(/-/g, "/");
D += '<li><div class="thumbp"><span><img alt="' + B + '"src="' + M + '"/></span></div><div class="titlexp"><h4>' + B + '</h4><div class="datex"><span class="dt">' + J + '</span><span class="cm">' + H + " " + k + '</span></div></div><div class="contxisi">' + K + "</div></li>"
}
D += "</ul>";
$(g).html(D);
(function (N) {
N.fn.simpleSpy = function (O, Q, P) {
O = O || 4;
Q = Q || 5000;
P = P || 1000;
return this.each(function () {
var X = N(this),
W = true,
V = [],
U = O,
R = X.find("> li:first").height(),
T = 0;
function S() {
if (W) {
var Y = N(V[U]).css({
height: 0,
opacity: 0
}).prependTo(X);
X.find("> li:last").animate({
opacity: 0
}, P, function () {
Y.animate({
height: R
}, P).animate({
opacity: 1
}, P);
N(this).remove()
});
U++;
if (U >= T) {
U = 0
}
}
setTimeout(S, Q)
}
X.find("> li").each(function () {
V.push("<li>" + N(this).html() + "</li>")
});
T = V.length;
X.wrap('<div class="spyWrapper" />').parent().css({
height: R * O
});
X.find("> li").filter(":gt(" + (O - 1) + ")").remove();
X.bind("stop", function () {
W = false
}).bind("start", function () {
W = true
});
S()
})
}
})(jQuery);
jQuery(function () {
if (j) {
jQuery("ul.spyrcp").simpleSpy(f, b, m).bind("mouseenter", function () {
jQuery(this).trigger("stop")
}).bind("mouseleave", function () {
jQuery(this).trigger("start")
})
}
})
} else {
$(g).html("<span>No result!</span>")
}
},
error: function () {
$(g).html("<strong>Error Loading Feed!</strong>")
}
})
};
return function (b) {
a(b)
}
})();
window.rccommnetsx = (function () {
var a = function (B) {
var e = B || {}, k = e.url_blog || window.location.host,
c = e.id_containrc || "#rcentcomnets",
m = e.numComments || 6,
j = e.avatarSize || 60,
i = e.animatedRecentcomments || false,
b = e.limitspyrkm || 4,
h = e.intervalspyrkm || 4000,
g = e.tickspeedrkm || 1000,
f = e.characters || 100,
A = e.defaultAvatar || "http://4.bp.blogspot.com/-AEWksK942OE/UFiyLzXJhiI/AAAAAAAAFKE/jBegaGPClxI/s70/user-anonymous-icon.png",
n = e.maxfeeds || 50,
d = e.adminBlog || "";
$.ajax({
url: "http://" + k + "/feeds/comments/default?alt=json-in-script",
type: "get",
dataType: "jsonp",
success: function (Q) {
var I, K = Q.feed.entry;
if (K !== undefined) {
I = "<ul class='rcomnetspy'>";
ntotal = 0;
for (var H = 0; H < n; H++) {
var G, M, J, C, L, E;
if (H == K.length) {
break
}
if (ntotal >= m) {
break
}
var P = K[H];
for (var F = 0; F < P.link.length; F++) {
if (P.link[F].rel == "alternate") {
G = P.link[F].href
}
}
for (var O = 0; O < P.author.length; O++) {
M = P.author[O].name.$t;
J = P.author[O].gd$image.src
}
if (M != d && ntotal < m) {
ntotal++;
I += "<li>";
if (J == "http://img1.blogblog.com/img/blank.gif") {
C = A
} else {
C = J.replace(/\/s[0-9]+(\-c|\/)/, "/s" + j + "$1")
}
var E = (P.author[0].uri) ? P.author[0].uri.$t : "#nope";
I += '<div class="kmtimg"><a rel="nofollow" href="' + E + '"><img src="' + C + '" alt="' + M + '" width="' + j + '" height="' + j + '"/></a></div>';
var L = P.gd$extendedProperty[1].value;
I += '<div class="ketkomt"><a rel="nofollow" href="' + G + '">' + M + "</a> <span>" + L + "</span></div>";
var N = P.content.$t;
var D = N.replace(/(<([^>]+)>)/gi, "");
if (D != "" && D.length > f) {
D = D.substring(0, f);
D += "…"
} else {
D = D
}
I += '<p class="komtsum">' + D + "</p>";
I += "</li>"
}
}
I += "</ul>";
$(c).html(I);
(function (R) {
R.fn.simpleSpyRkm = function (S, U, T) {
S = S || 4;
U = U || 5000;
T = T || 1000;
return this.each(function () {
var ab = R(this),
aa = true,
Z = [],
Y = S,
V = ab.find("> li:first").height(),
X = 0;
function W() {
if (aa) {
var ac = R(Z[Y]).css({
height: 0,
opacity: 0
}).prependTo(ab);
ab.find("> li:last").animate({
opacity: 0
}, T, function () {
ac.animate({
height: V
}, T).animate({
opacity: 1
}, T);
R(this).remove()
});
Y++;
if (Y >= X) {
Y = 0
}
}
setTimeout(W, U)
}
ab.find("> li").each(function () {
Z.push("<li>" + R(this).html() + "</li>")
});
X = Z.length;
ab.wrap('<div class="spyWrapperrkm" />').parent().css({
height: V * S
});
ab.find("> li").filter(":gt(" + (S - 1) + ")").remove();
ab.bind("stop", function () {
aa = false
}).bind("start", function () {
aa = true
});
W()
})
}
})(jQuery);
jQuery(function () {
if (i) {
jQuery("ul.rcomnetspy").simpleSpyRkm(b, h, g).bind("mouseenter", function () {
jQuery(this).trigger("stop")
}).bind("mouseleave", function () {
jQuery(this).trigger("start")
})
}
})
} else {
$(c).html("<span>No result!</span>")
}
},
error: function () {
$(c).html("<strong>Error Loading Feed!</strong>")
}
})
};
return function (b) {
a(b)
}
})();
window.breakingnews = (function () {
var a = function (d) {
var g = d || {}, b = g.url_blog || window.location.host,
f = g.breakingpostx || 8,
e = g.id_breaking || "#isibreakingnews",
h = g.animatedBreaking || true,
c = g.breakingcmtext || "Comments";
$.ajax({
url: "http://" + b + "/feeds/posts/default?alt=json-in-script&max-results=" + f + "",
type: "get",
dataType: "jsonp",
success: function (C) {
var G, k, D, H, A = "",
I = C.feed.entry;
if (I !== undefined) {
A = "<ul>";
for (var E = 0; E < I.length; E++) {
for (var B = 0; B < I[E].link.length; B++) {
if (I[E].link[B].rel == "alternate") {
G = I[E].link[B].href;
break
}
}
for (var m = 0; m < I[E].link.length; m++) {
if (I[E].link[m].rel == "replies" && I[E].link[m].type == "text/html") {
D = I[E].link[m].title.split(" ")[0];
break
}
}
k = I[E].title.$t;
H = I[E].published.$t.substring(0, 10);
H = H.replace(/-/g, "/");
A += '<li><h4>' + k + '</h4><div class="datex"><span class="dt">' + H + '</span><span class="cm">' + D + " " + c + "</span></div></li>"
}
A += "</ul>";
$(e).html(A);
if (h) {
function F() {
$("#isibreakingnews ul li:first").animate({
opacity: 0
}, 200, function () {
$(this).appendTo($("#isibreakingnews ul")).css("opacity", 1)
})
}
var n = setInterval(function () {
F()
}, 3000);
$(e).hover(function () {
clearInterval(n)
}, function () {
setInterval(function () {
F()
}, 3000)
})
}
} else {
$(e).html("<span>No result!</span>")
}
},
error: function () {
$(e).html("<strong>Error Loading Feed!</strong>")
}
})
};
return function (b) {
a(b)
}
})()
} else {
$(z).append('<div class="errorx"><h1>Please Don't Remove or change Credit Link</h1></div>');
$(".errorx").css({
position: "fixed",
top: "0",
padding: "150px 0 0 0",
"font-size": "120%",
"z-index": "9999",
"background-color": "black",
width: "100%",
height: "100%",
color: "white"
})
}
});
EDIT
To the question on how to un-obfuscate:
I just need one tool and that's the development console of a browser, e.g., Firebug.
Then search the code above for the call of eval(). Here it was just called once, sometimes it is called multiple times (even recursive calls can happen). Replace each occurrence of eval() with something like console.log(). That way instead of running the code, it is just printed to the console.
Then run it through an online js-beautifier like http://jsbeautifier.org/ and you have the above code.

Related

What type of JavaScript obfuscation is this and how can I properly deobfuscte it? (online deobfuscators don't work)

I'm trying to study this code but I can't read it. (code below) I tried deobfuscating it but it's just as hard to read as it was before. What type of obfuscation is this and what website, application, or process can I use to make it easy to read?
eval(function(p,a,c,k,e,d){while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+c+'\\b','g'),k[c])}}return p}('43 131=[\'\\73\\26\\11\\24\\7\\15\\10\\0\\3\\13\\8\\5\',\'\\55\\26\\11\\13\\80\\26\\10\\46\\3\\23\\9\\5\',\'\\3\\23\\33\\6\\3\\23\\7\\7\\25\\31\\56\\5\',\'\\3\\20\\48\\6\\25\\58\\14\\6\\37\\15\\10\\92\',\'\\55\\16\\10\\11\\3\\23\\3\\10\\85\\3\\5\\5\',\'\\85\\18\\10\\40\\78\\26\\11\\68\\32\\31\\5\\5\',\'\\50\\2\\14\\6\\40\\49\\67\\0\',\'\\3\\20\\18\\36\\3\\23\\0\\8\\55\\8\\5\\5\',\'\\3\\13\\62\\6\\25\\51\\69\\20\\3\\13\\20\\5\',\'\\78\\14\\49\\50\\49\\22\\31\\5\',\'\\30\\63\\41\\36\\68\\2\\20\\5\',\'\\3\\19\\8\\85\\3\\12\\9\\73\\79\\3\\5\\5\',\'\\22\\7\\26\\75\\3\\20\\12\\63\',\'\\54\\18\\10\\46\\3\\12\\49\\25\\16\\8\\5\\5\',\'\\3\\9\\69\\67\\16\\48\\19\\7\\33\\3\\5\\5\',\'\\3\\23\\32\\6\\52\\6\\50\\6\\52\\24\\9\\5\',\'\\31\\16\\10\\38\\3\\13\\37\\79\\73\\3\\5\\5\',\'\\3\\47\\46\\6\\77\\2\\26\\16\\50\\31\\5\\5\',\'\\80\\16\\10\\67\\79\\15\\11\\77\\17\\3\\5\\5\',\'\\6\\41\\33\\9\\2\\63\\49\\5\',\'\\55\\15\\10\\45\\45\\18\\11\\11\\17\\33\\5\\5\',\'\\63\\26\\10\\58\\3\\47\\2\\6\\77\\15\\11\\7\',\'\\56\\18\\11\\14\\70\\15\\10\\77\\3\\12\\56\\5\',\'\\3\\13\\37\\56\\3\\9\\62\\7\\25\\39\\49\\5\',\'\\3\\9\\25\\40\\85\\38\\78\\39\',\'\\3\\19\\32\\6\\39\\6\\33\\25\\68\\31\\5\\5\',\'\\3\\23\\40\\7\\52\\36\\37\\16\\3\\19\\0\\5\',\'\\3\\9\\33\\77\\30\\36\\33\\25\',\'\\3\\20\\78\\105\\3\\20\\67\\8\\68\\33\\5\\5\',\'\\3\\13\\78\\75\\54\\18\\11\\40\\68\\33\\5\\5\',\'\\50\\80\\15\\75\\31\\14\\49\\5\',\'\\3\\12\\75\\37\\73\\15\\10\\8\\54\\33\\5\\5\',\'\\3\\20\\36\\92\\45\\37\\55\\6\\19\\33\\5\\5\',\'\\2\\15\\11\\17\\7\\80\\16\\29\',\'\\30\\24\\13\\6\\25\\48\\22\\33\',\'\\3\\13\\92\\7\\75\\2\\55\\7\\77\\18\\11\\73\',\'\\56\\14\\48\\6\\20\\16\\11\\52\\3\\20\\8\\5\',\'\\3\\25\\39\\6\\39\\49\\19\\6\\39\\16\\11\\24\',\'\\45\\48\\31\\9\\2\\62\\37\\5\',\'\\3\\19\\32\\6\\33\\24\\19\\6\\58\\18\\11\\22\',\'\\3\\47\\62\\6\\62\\29\\8\\6\\3\\9\\16\\5\',\'\\3\\19\\7\\6\\62\\41\\46\\7\\47\\18\\10\\29\',\'\\3\\9\\20\\58\\6\\3\\31\\20\',\'\\3\\19\\14\\7\\33\\8\\22\\45\\10\\8\\5\\5\',\'\\3\\19\\2\\6\\58\\67\\32\\6\\75\\16\\10\\48\',\'\\3\\47\\9\\39\\3\\19\\41\\47\\17\\31\\5\\5\',\'\\54\\26\\11\\62\\3\\13\\13\\7\\19\\16\\10\\41\',\'\\3\\23\\49\\15\\22\\16\\11\\32\\51\\8\\5\\5\',\'\\3\\47\\40\\6\\39\\58\\2\\6\\33\\18\\10\\69\',\'\\3\\19\\32\\7\\52\\37\\81\\49\\3\\13\\56\\5\',\'\\3\\20\\14\\7\\44\\16\\11\\11\\3\\9\\31\\5\',\'\\3\\12\\9\\78\\26\\58\\16\\47\',\'\\3\\12\\22\\92\\51\\16\\11\\54\\8\\8\\5\\5\',\'\\3\\19\\48\\6\\52\\44\\18\\69\\3\\13\\18\\5\',\'\\3\\19\\14\\6\\15\\31\\62\\7\\19\\26\\10\\2\',\'\\73\\18\\10\\6\\3\\13\\70\\10\\81\\31\\5\\5\',\'\\3\\25\\48\\6\\75\\75\\24\\6\\36\\18\\11\\3\',\'\\3\\20\\18\\67\\3\\13\\20\\30\\56\\31\\5\\5\',\'\\3\\20\\30\\18\\10\\29\\40\\6\\15\\8\\5\\5\',\'\\3\\25\\7\\7\\39\\63\\45\\7\\40\\29\\49\\5\',\'\\3\\19\\19\\6\\19\\2\\31\\52\\3\\23\\26\\5\',\'\\3\\19\\45\\6\\20\\80\\26\\16\\10\\3\\5\\5\',\'\\3\\23\\39\\6\\52\\58\\0\\7\\3\\9\\0\\5\',\'\\3\\12\\48\\6\\36\\37\\17\\24\\3\\12\\0\\5\',\'\\3\\19\\55\\6\\52\\24\\37\\11\\32\\31\\5\\5\',\'\\26\\22\\37\\80\\63\\30\\31\\5\',\'\\3\\9\\7\\6\\15\\48\\9\\7\\3\\12\\0\\5\',\'\\7\\26\\11\\76\\3\\20\\24\\7\\36\\51\\26\\5\',\'\\3\\9\\45\\6\\20\\26\\11\\3\\16\\33\\16\\5\',\'\\3\\13\\19\\6\\20\\6\\92\\6\\52\\73\\3\\5\',\'\\17\\76\\70\\44\\3\\25\\75\\31\',\'\\3\\23\\33\\47\\45\\15\\11\\31\\8\\8\\5\\5\',\'\\68\\36\\48\\6\\58\\15\\10\\16\\3\\23\\31\\5\',\'\\3\\23\\24\\6\\37\\16\\11\\22\\79\\41\\31\\5\',\'\\16\\18\\11\\15\\7\\15\\10\\52\\3\\12\\20\\5\',\'\\3\\9\\52\\10\\55\\18\\11\\76\',\'\\81\\76\\24\\6\\77\\15\\10\\25\\3\\23\\16\\5\',\'\\16\\24\\92\\7\\15\\26\\11\\52\\3\\47\\8\\5\',\'\\8\\18\\10\\58\\3\\12\\50\\6\\58\\33\\20\\5\',\'\\3\\12\\3\\37\\46\\26\\10\\44\\3\\25\\49\\5\',\'\\3\\13\\14\\6\\19\\39\\14\\6\\40\\63\\18\\5\',\'\\3\\19\\13\\6\\40\\45\\20\\18\\3\\23\\33\\5\',\'\\3\\9\\45\\7\\58\\6\\9\\67\\16\\31\\5\\5\',\'\\3\\9\\7\\7\\58\\44\\92\\7\\75\\26\\11\\25\',\'\\54\\26\\11\\11\\50\\8\\22\\9\',\'\\32\\38\\37\\58\\54\\76\\31\\5\',\'\\79\\7\\49\\0\\26\\15\\11\\14\',\'\\10\\22\\40\\6\\52\\36\\0\\105\',\'\\3\\19\\29\\79\\3\\19\\52\\37\\41\\3\\5\\5\',\'\\56\\26\\10\\22\\3\\23\\51\\15\',\'\\2\\16\\10\\14\\78\\29\\13\\7\\37\\33\\5\\5\',\'\\54\\16\\11\\2\\32\\22\\31\\50\',\'\\14\\16\\11\\55\\10\\22\\0\\8\',\'\\31\\16\\11\\78\\3\\19\\46\\7\\39\\26\\11\\40\',\'\\3\\25\\56\\15\\3\\12\\51\\22\\30\\33\\5\\5\',\'\\17\\62\\49\\41\\49\\6\\9\\5\',\'\\7\\31\\26\\40\\63\\29\\70\\5\',\'\\46\\16\\10\\9\\32\\15\\11\\70\\10\\3\\5\\5\',\'\\30\\26\\11\\67\\3\\47\\39\\7\\44\\22\\0\\5\',\'\\55\\15\\10\\23\\78\\44\\92\\7\\20\\33\\5\\5\',\'\\3\\25\\37\\67\\3\\23\\25\\49\\49\\33\\5\\5\',\'\\3\\19\\40\\6\\20\\2\\17\\73\\17\\31\\5\\5\',\'\\85\\15\\11\\3\\3\\23\\14\\7\\19\\26\\10\\54\',\'\\3\\19\\2\\6\\77\\24\\31\\73\\32\\8\\5\\5\',\'\\3\\9\\14\\6\\37\\67\\14\\6\\39\\49\\22\\5\',\'\\3\\13\\39\\7\\25\\63\\39\\7\\20\\16\\11\\41\',\'\\3\\9\\46\\7\\19\\44\\50\\7\\39\\26\\10\\11\',\'\\3\\13\\30\\70\\3\\13\\50\\7\\52\\31\\5\\5\',\'\\22\\51\\24\\6\\44\\76\\8\\70\',\'\\7\\36\\13\\6\\33\\15\\11\\20\\3\\47\\15\\5\',\'\\68\\8\\49\\105\\22\\15\\11\\62\',\'\\3\\9\\12\\10\\85\\16\\11\\12\\16\\8\\5\\5\',\'\\3\\13\\7\\6\\25\\39\\7\\6\\52\\51\\31\\5\',\'\\3\\20\\7\\7\\62\\37\\50\\7\\52\\31\\5\\5\',\'\\3\\25\\48\\7\\25\\15\\11\\24\\3\\23\\25\\20\',\'\\8\\41\\0\\18\\63\\0\\20\\5\',\'\\3\\20\\29\\47\\6\\33\\40\\6\\75\\33\\5\\5\',\'\\3\\9\\12\\29\\56\\3\\19\\7\\75\\3\\5\\5\',\'\\3\\19\\24\\6\\47\\24\\69\\9\\3\\9\\3\\5\',\'\\68\\15\\10\\31\\3\\12\\12\\54\\6\\8\\5\\5\',\'\\3\\12\\31\\20\\41\\16\\10\\3\\3\\25\\16\\5\',\'\\3\\9\\39\\6\\20\\3\\33\\16\\3\\9\\18\\5\',\'\\2\\18\\11\\51\\31\\80\\50\\6\\40\\8\\5\\5\',\'\\3\\12\\2\\6\\52\\54\\9\\56\',\'\\11\\62\\45\\7\\25\\18\\10\\45\\3\\25\\18\\5\',\'\\2\\16\\10\\62\\3\\20\\20\\41\',\'\\2\\16\\11\\3\\3\\23\\40\\7\\40\\26\\10\\80\',\'\\3\\12\\39\\6\\77\\15\\11\\47\\2\\6\\3\\5\',\'\\3\\20\\45\\6\\47\\45\\8\\50\\11\\8\\5\\5\',\'\\73\\14\\40\\6\\47\\16\\10\\69\\3\\23\\26\\5\',\'\\68\\15\\11\\33\\8\\18\\10\\50\\3\\13\\70\\5\',\'\\3\\9\\49\\6\\50\\67\\15\\56\'];(21(28,72){43 35=21(34){163(--34){28[\'123\'](28[\'164\']())}},42=21(){43 34={\'165\':{\'166\':\'144\',\'167\':\'168\'},\'142\':21(65,57,60,84){84=84||{};83 89=57+\'=\'+60,104=66;99(83 53=66,98=65[\'96\'];53<98;53++){43 125=65[53];89+=\';\\86\'+125;43 103=65[125];65[\'123\'](103),98=65[\'96\'],103!==!![]&&(89+=\'=\'+103)}84[\'144\']=89},\'130\':21(){27\'171\'},\'141\':21(65,57){65=65||21(89){27 89};43 60=65(120 132(\'(?:^|;\\86)\'+57[\'136\'](/([.$?*|{}()[]\\/+^])/34,\'$1\')+\'=([^;]*)\')),84=21(89,104){89(++104)};27 84(35,72),60?135(60[111]):114}},64=21(){43 65=120 132(\'\\116+\\86*\\115(\\115)\\86*{\\116+\\86*[\\117|\\118].+[\\117|\\118];?\\86*}\');27 65[\'152\'](34[\'130\'][\'128\']())};34[\'143\']=64;83 90=\'\';43 91=34[\'143\']();74(!91)34[\'142\']([\'*\'],\'140\',111);95 91?90=34[\'141\'](106,\'140\'):34[\'130\']()};42()}(131,177));43 4=21(28,72){28=28-66;83 35=131[28];74(4[\'156\']===114){183 42=21(34){43 64=\'180+/=\',90=127(34)[\'136\'](/=+$/,\'\');83 91=\'\';99(83 65=66,57,60,84=66;60=90[\'182\'](84++);~60&&(57=65%139?57*162+60:60,65++%139)?91+=127[\'145\'](172&57>>(-146*65&169)):66){60=64[\'174\'](60)}27 91};43 88=21(34,64){83 57=[],60=66,84,89=\'\',104=\'\';34=42(34);99(83 98=66,103=34[\'96\'];98<103;98++){104+=\'%\'+(\'181\'+34[\'133\'](98)[\'128\'](178))[\'176\'](-146)}34=135(104);83 53;99(53=66;53<100;53++){57[53]=53}99(53=66;53<100;53++){60=(60+57[53]+64[\'133\'](53%64[\'96\']))%100,84=57[53],57[53]=57[60],57[60]=84}53=66,60=66;99(83 112=66;112<34[\'96\'];112++){53=(53+111)%100,60=(60+57[53])%100,84=57[53],57[53]=57[60],57[60]=84,89+=127[\'145\'](34[\'133\'](112)^57[(57[53]+57[60])%100])}27 89};4[\'155\']=88,4[\'126\']={},4[\'156\']=!![]}43 61=4[\'126\'][28];74(61===114){74(4[\'159\']===114){43 34=21(64){71[\'149\']=64,71[\'97\']=[111,66,66],71[\'151\']=21(){27\'175\'},71[\'154\']=\'\\116+\\86*\\115(\\115)\\86*{\\116+\\86*\',71[\'153\']=\'[\\117|\\118].+[\\117|\\118];?\\86*}\'};34[\'124\'][\'160\']=21(){43 64=120 132(71[\'154\']+71[\'153\']),90=64[\'152\'](71[\'151\'][\'128\']())?--71[\'97\'][111]:--71[\'97\'][66];27 71[\'150\'](90)},34[\'124\'][\'150\']=21(64){74(!170(~64))27 64;27 71[\'137\'](71[\'149\'])},34[\'124\'][\'137\']=21(64){99(83 91=66,65=71[\'97\'][\'96\'];91<65;91++){71[\'97\'][\'123\'](148[\'173\'](148[\'161\']())),65=71[\'97\'][\'96\']}27 64(71[\'97\'][66])},120 34(4)[\'160\'](),4[\'159\']=!![]}35=4[\'155\'](35,72),4[\'126\'][28]=35}95 35=61;27 35};43 147=21(){43 28={\'\\49\\36\\48\\75\\73\':4(\'\\0\\2\\38\\24\',\'\\15\\16\\54\\19\')+4(\'\\0\\2\\9\\24\',\'\\68\\25\\39\\22\')+4(\'\\0\\2\\38\\23\',\'\\6\\63\\37\\38\')+4(\'\\0\\2\\9\\38\',\'\\94\\19\\30\\94\')+\'\\92\',\'\\11\\10\\55\\6\\50\':4(\'\\0\\2\\38\\0\',\'\\30\\16\\46\\10\')+\'\\138\\105\\129\\86\\105\'+4(\'\\0\\2\\18\\24\',\'\\18\\6\\22\\40\')+4(\'\\0\\2\\29\\69\',\'\\67\\39\\73\\49\')+4(\'\\0\\2\\13\\38\',\'\\54\\101\\80\\17\'),\'\\55\\47\\63\\54\\11\':21(35){27 35()},\'\\85\\14\\30\\39\\50\':21(35,42){27 35(42)},\'\\48\\44\\22\\58\\50\':4(\'\\0\\2\\13\\12\',\'\\6\\14\\59\\36\')+4(\'\\0\\2\\12\\69\',\'\\15\\30\\25\\87\')+4(\'\\0\\2\\13\\6\',\'\\46\\17\\15\\6\')+\'\\14\\59\',\'\\44\\62\\25\\30\\7\':21(35,42){27 35===42},\'\\62\\63\\79\\6\\85\':4(\'\\0\\2\\24\\69\',\'\\32\\3\\30\\36\'),\'\\55\\78\\20\\26\\48\':21(35,42){27 35!==42},\'\\30\\51\\10\\85\\79\':4(\'\\0\\2\\24\\24\',\'\\10\\12\\59\\18\'),\'\\44\\40\\52\\25\\19\':4(\'\\0\\2\\9\',\'\\55\\76\\20\\81\'),\'\\73\\20\\6\\50\\76\':4(\'\\0\\2\\38\\6\',\'\\7\\37\\101\\44\')};83 72=!![];27 21(35,42){43 61={\'\\44\\17\\76\\67\\79\':28[4(\'\\0\\2\\38\\18\',\'\\13\\37\\59\\6\')],\'\\48\\62\\67\\41\\30\':28[4(\'\\0\\2\\9\\9\',\'\\40\\54\\19\\14\')],\'\\50\\22\\50\\32\\8\':21(88){27 28[\'\\55\\47\\63\\54\\11\'](88)},\'\\15\\70\\44\\46\\70\':21(88,34){27 28[4(\'\\0\\2\\13\\69\',\'\\56\\36\\45\\0\')](88,34)},\'\\31\\22\\44\\73\\50\':28[4(\'\\0\\2\\29\\13\',\'\\45\\26\\33\\8\')],\'\\32\\25\\20\\31\\56\':21(88,34){27 28[4(\'\\0\\2\\18\\38\',\'\\8\\32\\8\\32\')](88,34)},\'\\17\\16\\33\\32\\68\':28[4(\'\\0\\2\\29\\6\',\'\\67\\14\\2\\80\')],\'\\26\\49\\44\\25\\36\':21(88,34){27 28[4(\'\\0\\2\\13\\30\',\'\\19\\48\\56\\110\')](88,34)},\'\\8\\41\\26\\52\\22\':28[4(\'\\0\\2\\13\\29\',\'\\67\\39\\73\\49\')]};74(28[4(\'\\0\\2\\0\',\'\\15\\30\\25\\87\')](28[4(\'\\0\\2\\9\\7\',\'\\93\\69\\102\\7\')],28[4(\'\\0\\2\\29\\30\',\'\\8\\32\\8\\32\')])){21 88(){43 34=21(){43 64=34[4(\'\\0\\2\\24\\12\',\'\\6\\14\\59\\36\')+\'\\41\\49\\6\\14\\10\'+\'\\41\'](61[4(\'\\0\\2\\23\\29\',\'\\45\\26\\33\\8\')])()[4(\'\\0\\2\\24\\12\',\'\\6\\14\\59\\36\')+4(\'\\0\\2\\12\\22\',\'\\25\\0\\16\\44\')+\'\\41\'](61[4(\'\\0\\2\\38\\29\',\'\\46\\17\\15\\6\')]);27!64[4(\'\\0\\2\\13\\0\',\'\\10\\12\\59\\18\')](119)};27 61[4(\'\\0\\2\\24\\6\',\'\\47\\15\\78\\26\')](34)}}95{43 34=72?21(){74(61[4(\'\\0\\2\\69\',\'\\9\\62\\20\\93\')](61[4(\'\\0\\2\\24\\23\',\'\\18\\6\\22\\40\')],61[4(\'\\0\\2\\13\\18\',\'\\13\\37\\59\\6\')])){74(42){74(61[4(\'\\0\\2\\23\\6\',\'\\48\\134\\11\\32\')](61[4(\'\\0\\2\\18\\29\',\'\\6\\63\\37\\38\')],61[\'\\8\\41\\26\\52\\22\'])){21 64(){74(42){43 90=42[4(\'\\0\\2\\12\\29\',\'\\81\\51\\107\\46\')](35,113);27 42=106,90}}}95{43 90=42[4(\'\\0\\2\\29\\12\',\'\\33\\15\\29\\79\')](35,113);27 42=106,90}}}95{21 91(){82[4(\'\\0\\2\\13\\8\',\'\\56\\36\\45\\0\')+\'\\17\'][4(\'\\0\\2\\24\\13\',\'\\10\\12\\59\\18\')+\'\\17\\14\'][4(\'\\0\\2\\12\\18\',\'\\45\\58\\102\\12\')+4(\'\\0\\2\\23\',\'\\6\\14\\59\\36\')]=()=>{27!![]},82[4(\'\\0\\2\\9\\6\',\'\\45\\26\\33\\8\')+\'\\17\'][4(\'\\0\\2\\9\\8\',\'\\18\\6\\22\\40\')+\'\\17\\14\'][4(\'\\0\\2\\12\\9\',\'\\29\\17\\129\\32\')+4(\'\\0\\2\\9\\23\',\'\\8\\87\\46\\58\')](!![]),61[4(\'\\0\\2\\13\\7\',\'\\7\\37\\101\\44\')](121,108),122[4(\'\\0\\2\\9\\0\',\'\\40\\36\\3\\68\')](61[4(\'\\0\\2\\12\\8\',\'\\39\\6\\94\\46\')])}}}:21(){};27 72=![],34}}}(),119=147(71,21(){43 28={\'\\81\\16\\47\\47\\51\':21(35,42){27 35(42)},\'\\77\\68\\52\\77\\50\':21(35,42){27 35!==42},\'\\70\\51\\80\\22\\78\':4(\'\\0\\2\\29\\18\',\'\\25\\0\\16\\44\'),\'\\10\\77\\67\\47\\76\':4(\'\\0\\2\\30\',\'\\56\\36\\45\\0\'),\'\\52\\36\\44\\55\\44\':4(\'\\0\\2\\38\\22\',\'\\15\\30\\25\\87\')+4(\'\\0\\2\\8\',\'\\15\\16\\54\\19\')+4(\'\\0\\2\\9\\13\',\'\\30\\16\\46\\10\')+4(\'\\0\\2\\51\',\'\\6\\63\\37\\38\')+\'\\92\',\'\\32\\47\\37\\48\\39\':21(35){27 35()}},72=21(){43 35={\'\\11\\63\\10\\26\\85\':21(42,61){27 28[4(\'\\0\\2\\24\\7\',\'\\94\\19\\30\\94\')](42,61)},\'\\79\\25\\31\\37\\46\':\'\\77\\32\\80\\41\\8\'+4(\'\\0\\2\\9\\69\',\'\\81\\51\\107\\46\')+4(\'\\0\\2\\24\\29\',\'\\8\\87\\46\\58\')+\'\\14\\59\'};74(28[4(\'\\0\\2\\12\\7\',\'\\55\\76\\20\\81\')](28[4(\'\\0\\2\\23\\18\',\'\\8\\32\\8\\32\')],28[4(\'\\0\\2\\12\',\'\\7\\37\\101\\44\')])){43 42=72[4(\'\\0\\2\\29\\0\',\'\\13\\37\\59\\6\')+4(\'\\0\\2\\18\\0\',\'\\15\\30\\25\\87\')+\'\\41\'](28[4(\'\\0\\2\\13\\9\',\'\\32\\3\\30\\36\')])()[4(\'\\0\\2\\12\\23\',\'\\9\\62\\20\\93\')+4(\'\\0\\2\\29\\29\',\'\\93\\69\\102\\7\')+\'\\41\'](4(\'\\0\\2\\38\\38\',\'\\93\\69\\102\\7\')+4(\'\\0\\2\\29\\9\',\'\\47\\15\\78\\26\')+\'\\94\\134\\86\\138\\105\'+4(\'\\0\\2\\12\\51\',\'\\46\\17\\15\\6\')+4(\'\\0\\2\\23\\0\',\'\\19\\48\\56\\110\'));27!42[4(\'\\0\\2\\38\\13\',\'\\36\\70\\31\\77\')](119)}95{21 61(){82[\'\\22\\2\\14\\22\\41\'+\'\\17\'][4(\'\\0\\2\\13\',\'\\22\\59\\29\\40\')+\'\\17\\14\'][4(\'\\0\\2\\12\\38\',\'\\7\\73\\107\\69\')+4(\'\\0\\2\\24\',\'\\41\\75\\30\\17\')]&&(82[\'\\22\\2\\14\\22\\41\'+\'\\17\'][4(\'\\0\\2\\29\\51\',\'\\13\\37\\59\\6\')+\'\\17\\14\'][4(\'\\0\\2\\38\\51\',\'\\33\\15\\29\\79\')+4(\'\\0\\2\\29\',\'\\39\\55\\14\\48\')]=()=>{27!![]},82[4(\'\\0\\2\\12\\0\',\'\\81\\51\\107\\46\')+\'\\17\'][4(\'\\0\\2\\23\\24\',\'\\8\\87\\54\\93\')+\'\\17\\14\'][4(\'\\0\\2\\29\\22\',\'\\63\\44\\0\\30\')+4(\'\\0\\2\\24\\0\',\'\\56\\13\\70\\110\')](!![]),35[4(\'\\0\\2\\24\\8\',\'\\55\\76\\20\\81\')](121,108),122[4(\'\\0\\2\\9\\22\',\'\\48\\134\\11\\32\')](35[4(\'\\0\\2\\24\\9\',\'\\6\\63\\37\\38\')]))}}};27 28[4(\'\\0\\2\\29\\7\',\'\\8\\87\\46\\58\')](72)});119();83 108=179(()=>{43 28={\'\\79\\37\\17\\7\\50\':4(\'\\0\\2\\24\\30\',\'\\39\\55\\14\\48\')+4(\'\\0\\2\\23\\69\',\'\\33\\15\\29\\79\')+4(\'\\0\\2\\23\\7\',\'\\40\\54\\19\\14\')+\'\\14\\59\',\'\\39\\48\\52\\85\\3\':21(72,35){27 72!==35},\'\\26\\15\\70\\20\\85\':4(\'\\0\\2\\23\\13\',\'\\36\\70\\31\\77\'),\'\\25\\41\\17\\14\\31\':4(\'\\0\\2\\38\\30\',\'\\63\\44\\0\\30\'),\'\\19\\75\\33\\50\\68\':4(\'\\0\\2\\29\\38\',\'\\40\\36\\3\\68\'),\'\\41\\30\\79\\55\\75\':\'\\37\\11\\55\\3\\6\',\'\\76\\54\\10\\81\\44\':21(72,35){27 72!==35},\'\\76\\7\\41\\32\\8\':4(\'\\0\\2\\24\\51\',\'\\56\\36\\45\\0\'),\'\\3\\32\\51\\17\\70\':21(72,35){27 72(35)}};74(82[4(\'\\0\\2\\29\\8\',\'\\67\\14\\2\\80\')+\'\\17\']){74(28[4(\'\\0\\2\\9\\51\',\'\\45\\58\\102\\12\')](28[4(\'\\0\\2\\23\\51\',\'\\101\\6\\12\\45\')],28[4(\'\\0\\2\\29\\23\',\'\\81\\51\\107\\46\')])){74(82[4(\'\\0\\2\\13\\22\',\'\\9\\62\\20\\93\')+\'\\17\'][4(\'\\0\\2\\38\\9\',\'\\47\\15\\78\\26\')+\'\\17\\14\']){74(28[4(\'\\0\\2\\12\\24\',\'\\14\\15\\8\\10\')](28[4(\'\\0\\2\\13\\23\',\'\\94\\19\\30\\94\')],28[4(\'\\0\\2\\22\',\'\\30\\16\\46\\10\')])){21 72(){82[4(\'\\0\\2\\38\\8\',\'\\8\\87\\46\\58\')+\'\\17\'][4(\'\\0\\2\\18\',\'\\8\\32\\8\\32\')+\'\\17\\14\']&&(82[4(\'\\0\\2\\9\\12\',\'\\55\\76\\20\\81\')+\'\\17\'][4(\'\\0\\2\\12\\6\',\'\\6\\14\\59\\36\')+\'\\17\\14\'][4(\'\\0\\2\\12\\13\',\'\\68\\25\\39\\22\')+4(\'\\0\\2\\7\',\'\\12\\62\\79\\39\')]&&(82[4(\'\\0\\2\\12\\12\',\'\\8\\32\\8\\32\')+\'\\17\'][4(\'\\0\\2\\24\\22\',\'\\32\\3\\30\\36\')+\'\\17\\14\'][4(\'\\0\\2\\12\\18\',\'\\45\\58\\102\\12\')+4(\'\\0\\2\\29\\24\',\'\\18\\6\\22\\40\')]=()=>{27!![]},82[4(\'\\0\\2\\38\',\'\\7\\37\\101\\44\')+\'\\17\'][4(\'\\0\\2\\24\\13\',\'\\10\\12\\59\\18\')+\'\\17\\14\'][4(\'\\0\\2\\23\\8\',\'\\41\\75\\30\\17\')+4(\'\\0\\2\\9\\29\',\'\\94\\19\\30\\94\')](!![]),121(108),122[\'\\73\\8\\41\\17\'](28[4(\'\\0\\2\\38\\12\',\'\\46\\17\\15\\6\')])))}}95 82[4(\'\\0\\2\\13\\8\',\'\\56\\36\\45\\0\')+\'\\17\'][4(\'\\0\\2\\13\',\'\\22\\59\\29\\40\')+\'\\17\\14\'][4(\'\\0\\2\\23\\22\',\'\\10\\12\\59\\18\')+\'\\41\\8\\7\\22\\7\']&&(82[4(\'\\0\\2\\24\\38\',\'\\6\\14\\59\\36\')+\'\\17\'][4(\'\\0\\2\\23\\38\',\'\\129\\38\\93\\93\')+\'\\17\\14\'][\'\\70\\54\\77\\32\\80\'+4(\'\\0\\2\\23\\9\',\'\\40\\36\\3\\68\')]=()=>{74(28[4(\'\\0\\2\\9\\18\',\'\\25\\0\\16\\44\')](28[4(\'\\0\\2\\9\\30\',\'\\8\\87\\54\\93\')],28[4(\'\\0\\2\\12\\30\',\'\\15\\16\\54\\19\')]))27!![];95{21 35(){43 42=158?21(){74(109){43 61=109[4(\'\\0\\2\\23\\12\',\'\\55\\76\\20\\81\')](157,113);27 109=106,61}}:21(){};27 158=![],42}}},82[4(\'\\0\\2\\24\\38\',\'\\6\\14\\59\\36\')+\'\\17\'][4(\'\\0\\2\\38\\7\',\'\\67\\14\\2\\80\')+\'\\17\\14\'][4(\'\\0\\2\\13\\51\',\'\\78\\32\\59\\18\')+4(\'\\0\\2\\13\\24\',\'\\15\\16\\54\\19\')](!![]),28[4(\'\\0\\2\\6\',\'\\19\\48\\56\\110\')](121,108),122[4(\'\\0\\2\\23\\23\',\'\\56\\13\\70\\110\')](4(\'\\0\\2\\38\\69\',\'\\47\\15\\78\\26\')+4(\'\\0\\2\\23\\30\',\'\\8\\87\\46\\58\')+4(\'\\0\\2\\13\\13\',\'\\56\\36\\45\\0\')+\'\\14\\59\'))}}95{21 35(){43 42=109[4(\'\\0\\2\\24\\18\',\'\\68\\25\\39\\22\')](157,113);27 109=106,42}}}},66);',10,184,'x30||x78|x57|x0b|x3d|x63|x64|x61|x34|x6f|x6b|x35|x37|x74|x53|x43|x6e|x38|x52|x4f|function|x65|x36|x33|x50|x6d|return|a|x31|x62|x71|x70|x47|g|c|x48|x4b|x32|x4a|x56|x72|d|const|x4d|x68|x42|x51|x5a|x75|x6c|x66|x54|q|x73|x46|x79|l|x49|x21|m|e|x4e|x76|h|k|0x0|x58|x45|x39|x69|this|b|x77|if|x4c|x59|x55|x6a|x44|x67|x7a|window|let|n|x41|x20|x29|f|o|i|j|x2f|x25|x5b|else|length|ZaoPMV|r|for|0x100|x24|x23|t|p|x2b|null|x2a|getty|fn|x40|0x1|u|arguments|undefined|x5c|x5cw|x27|x22|x0c|new|clearInterval|console|push|prototype|s|ADHzwk|String|toString|x28|removeCookie|x0a|RegExp|charCodeAt|x5e|decodeURIComponent|replace|DahyFf|x5d|0x4|counter|getCookie|setCookie|updateCookie|cookie|fromCharCode|0x2|x0d|Math|TnMSGS|UYUoFP|pnDyjS|test|IYXvmR|idIjbE|TincGx|lDJdYL|context|firstCall|lGBOmf|xjzRBR|random|0x40|while|shift|data|key|value|timeout|0x6|Boolean|dev|0xff|round|indexOf|newState|slice|0x8f|0x10|setInterval|abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789|00|charAt|var'.split('|')))
This question is a bit out of my depth, but this is how I would start deciphering it.
First step would be to replace eval with document.write, that yields us with something that looks a bit more like regular JS. It's not a lot better, but now we can see that it's one large array, and a couple of functions.
const x0a = ['\x77\x6d\x6b\x33\x64\x53\x6f\x30\x57\x37\x61\x3d', '\x46\x6d\x6b\x37\x67\x6d\x6f\x42\x57\x36\x34\x3d', '\x57\x36\x47\x63\x57\x36\x64\x64\x50\x71\x79\x3d', '\x57\x4f\x5a\x63\x50\x49\x74\x63\x4b\x53\x6f\x2f', '\x46\x43\x6f\x6b\x57\x36\x57\x6f\x41\x57\x3d\x3d', '\x41\x38\x6f\x56\x6a\x6d\x6b\x45\x70\x71\x3d\x3d', '\x6c\x78\x74\x63\x56\x75\x58\x30', '\x57\x4f\x38\x48\x57\x36\x30\x61\x46\x61\x3d\x3d', '\x57\x37\x4e\x63\x50\x66\x39\x4f\x57\x37\x4f\x3d', '\x6a\x74\x75\x6c\x75\x65\x71\x3d', '\x62\x76\x72\x48\x45\x78\x4f\x3d', '\x57\x52\x61\x41\x57\x35\x34\x77\x44\x57\x3d\x3d', '\x65\x64\x6d\x4c\x57\x4f\x35\x76', '\x73\x38\x6f\x42\x57\x35\x75\x50\x43\x61\x3d\x3d', '\x57\x34\x39\x58\x43\x5a\x52\x64\x47\x57\x3d\x3d', '\x57\x36\x70\x63\x54\x63\x6c\x63\x54\x33\x34\x3d', '\x71\x43\x6f\x32\x57\x37\x4b\x44\x77\x57\x3d\x3d', '\x57\x51\x42\x63\x55\x78\x6d\x43\x6c\x71\x3d\x3d', '\x67\x43\x6f\x58\x44\x53\x6b\x55\x6e\x57\x3d\x3d', '\x63\x72\x47\x34\x78\x76\x75\x3d', '\x46\x53\x6f\x68\x68\x38\x6b\x6b\x6e\x47\x3d\x3d', '\x76\x6d\x6f\x49\x57\x51\x78\x63\x55\x53\x6b\x64', '\x79\x38\x6b\x74\x69\x53\x6f\x55\x57\x35\x79\x3d', '\x57\x37\x4b\x79\x57\x34\x4e\x64\x50\x4a\x75\x3d', '\x57\x34\x50\x56\x41\x32\x6a\x4a', '\x57\x52\x70\x63\x4a\x63\x47\x50\x45\x71\x3d\x3d', '\x57\x36\x56\x64\x54\x48\x4b\x43\x57\x52\x30\x3d', '\x57\x34\x47\x55\x62\x48\x47\x50', '\x57\x4f\x6a\x2b\x57\x4f\x58\x61\x45\x47\x3d\x3d', '\x57\x37\x6a\x4c\x73\x38\x6b\x56\x45\x47\x3d\x3d', '\x6c\x67\x53\x4c\x71\x74\x75\x3d', '\x57\x35\x4c\x4b\x77\x53\x6f\x61\x73\x47\x3d\x3d', '\x57\x4f\x48\x2f\x68\x4b\x46\x63\x52\x47\x3d\x3d', '\x78\x53\x6b\x6e\x64\x67\x43\x31', '\x62\x33\x37\x63\x50\x5a\x65\x47', '\x57\x37\x2f\x64\x4c\x78\x46\x64\x55\x38\x6b\x77', '\x79\x74\x5a\x63\x4f\x43\x6b\x54\x57\x4f\x61\x3d', '\x57\x50\x4a\x63\x4a\x75\x52\x63\x4a\x43\x6b\x33', '\x68\x5a\x71\x34\x78\x4e\x4b\x3d', '\x57\x52\x70\x63\x47\x33\x52\x63\x49\x38\x6b\x65', '\x57\x51\x4e\x63\x4e\x31\x61\x63\x57\x34\x43\x3d', '\x57\x52\x64\x63\x4e\x72\x42\x64\x51\x38\x6f\x31', '\x57\x34\x4f\x49\x63\x57\x71\x4f', '\x57\x52\x74\x64\x47\x61\x65\x68\x6f\x61\x3d\x3d', '\x57\x52\x78\x63\x49\x58\x70\x63\x4c\x43\x6f\x5a', '\x57\x51\x34\x4a\x57\x52\x72\x51\x6e\x71\x3d\x3d', '\x73\x6d\x6b\x4e\x57\x37\x37\x64\x52\x43\x6f\x72', '\x57\x36\x75\x53\x65\x43\x6b\x70\x66\x61\x3d\x3d', '\x57\x51\x56\x63\x4a\x49\x78\x63\x47\x38\x6f\x39', '\x57\x52\x70\x64\x54\x4b\x7a\x75\x57\x37\x79\x3d', '\x57\x4f\x74\x64\x4d\x43\x6b\x6b\x57\x34\x71\x3d', '\x57\x35\x34\x6a\x6d\x49\x43\x51', '\x57\x35\x65\x2f\x66\x43\x6b\x73\x61\x61\x3d\x3d', '\x57\x52\x5a\x63\x54\x4d\x38\x39\x57\x37\x38\x3d', '\x57\x52\x74\x63\x53\x71\x4e\x64\x52\x6d\x6f\x78', '\x77\x38\x6f\x63\x57\x37\x69\x6f\x7a\x71\x3d\x3d', '\x57\x50\x5a\x63\x4c\x4c\x33\x63\x48\x38\x6b\x57', '\x57\x4f\x38\x58\x57\x37\x4f\x62\x79\x71\x3d\x3d', '\x57\x4f\x62\x38\x6f\x31\x56\x63\x53\x61\x3d\x3d', '\x57\x50\x64\x64\x4a\x76\x68\x64\x56\x31\x75\x3d', '\x57\x52\x52\x63\x52\x78\x71\x54\x57\x36\x6d\x3d', '\x57\x52\x68\x63\x4f\x67\x6d\x43\x6f\x57\x3d\x3d', '\x57\x36\x4a\x63\x54\x49\x30\x64\x57\x34\x30\x3d', '\x57\x35\x5a\x63\x48\x4b\x6e\x33\x57\x35\x30\x3d', '\x57\x52\x46\x63\x54\x33\x4b\x6b\x70\x71\x3d\x3d', '\x6d\x65\x4b\x67\x76\x62\x71\x3d', '\x57\x34\x64\x63\x53\x5a\x34\x64\x57\x35\x30\x3d', '\x64\x6d\x6b\x59\x57\x4f\x33\x64\x48\x66\x6d\x3d', '\x57\x34\x68\x63\x4f\x6d\x6b\x57\x43\x47\x43\x3d', '\x57\x37\x52\x63\x4f\x63\x2f\x63\x54\x77\x57\x3d', '\x6e\x59\x69\x4d\x57\x50\x4c\x71', '\x57\x36\x47\x51\x68\x53\x6b\x71\x61\x61\x3d\x3d', '\x45\x48\x5a\x63\x49\x53\x6f\x43\x57\x36\x71\x3d', '\x57\x36\x33\x63\x4b\x43\x6b\x65\x44\x72\x71\x3d', '\x43\x38\x6b\x53\x64\x53\x6f\x54\x57\x35\x4f\x3d', '\x57\x34\x54\x6f\x46\x38\x6b\x59', '\x7a\x59\x33\x63\x55\x53\x6f\x50\x57\x36\x43\x3d', '\x43\x33\x2f\x64\x53\x6d\x6b\x54\x57\x51\x61\x3d', '\x61\x38\x6f\x49\x57\x35\x6c\x63\x49\x47\x4f\x3d', '\x57\x35\x57\x4b\x42\x6d\x6f\x4d\x57\x50\x75\x3d', '\x57\x37\x74\x63\x52\x4a\x74\x63\x56\x76\x38\x3d', '\x57\x52\x37\x63\x56\x68\x4f\x38\x57\x36\x47\x3d', '\x57\x34\x68\x64\x49\x63\x34\x58\x43\x71\x3d\x3d', '\x57\x34\x64\x64\x49\x4d\x2f\x64\x4c\x6d\x6b\x50', '\x73\x6d\x6b\x6b\x6c\x61\x65\x34', '\x70\x32\x4b\x49\x73\x59\x71\x3d', '\x44\x64\x75\x30\x6d\x53\x6b\x74', '\x6f\x65\x56\x63\x54\x48\x30\x2b', '\x57\x52\x31\x44\x57\x52\x54\x4b\x72\x57\x3d\x3d', '\x79\x6d\x6f\x65\x57\x36\x66\x53', '\x78\x43\x6f\x74\x6a\x31\x37\x64\x4b\x47\x3d\x3d', '\x73\x43\x6b\x78\x70\x65\x71\x6c', '\x74\x43\x6b\x46\x6f\x65\x30\x61', '\x71\x43\x6b\x6a\x57\x52\x42\x64\x4a\x6d\x6b\x56', '\x57\x50\x79\x53\x57\x35\x66\x65\x62\x47\x3d\x3d', '\x6e\x4e\x75\x72\x75\x63\x34\x3d', '\x64\x71\x6d\x56\x76\x31\x69\x3d', '\x42\x43\x6f\x34\x70\x53\x6b\x69\x6f\x57\x3d\x3d', '\x62\x6d\x6b\x58\x57\x51\x4a\x64\x4d\x65\x30\x3d', '\x46\x53\x6f\x36\x6a\x4d\x2f\x64\x4f\x47\x3d\x3d', '\x57\x50\x4b\x58\x57\x36\x50\x75\x75\x47\x3d\x3d', '\x57\x52\x56\x63\x4f\x78\x6e\x77\x6e\x71\x3d\x3d', '\x41\x53\x6b\x57\x57\x36\x74\x64\x52\x6d\x6f\x73', '\x57\x52\x78\x63\x55\x33\x71\x77\x70\x61\x3d\x3d', '\x57\x34\x74\x63\x4b\x58\x74\x63\x4a\x75\x65\x3d', '\x57\x37\x4a\x64\x50\x76\x4a\x64\x4f\x43\x6b\x72', '\x57\x34\x42\x64\x52\x4d\x6c\x64\x4a\x6d\x6f\x6b', '\x57\x37\x62\x69\x57\x37\x6c\x64\x54\x71\x3d\x3d', '\x65\x66\x33\x63\x4d\x59\x61\x69', '\x64\x48\x37\x63\x47\x53\x6b\x4f\x57\x51\x53\x3d', '\x45\x61\x75\x2b\x65\x53\x6b\x4e', '\x57\x34\x35\x6f\x41\x43\x6b\x35\x43\x61\x3d\x3d', '\x57\x37\x64\x63\x50\x4a\x64\x63\x54\x66\x71\x3d', '\x57\x4f\x64\x64\x4e\x4b\x6c\x64\x54\x71\x3d\x3d', '\x57\x50\x5a\x64\x50\x53\x6b\x33\x57\x36\x50\x4f', '\x61\x72\x30\x38\x76\x30\x4f\x3d', '\x57\x4f\x31\x51\x63\x47\x56\x63\x4c\x47\x3d\x3d', '\x57\x34\x35\x31\x79\x57\x52\x64\x4c\x57\x3d\x3d', '\x57\x52\x33\x63\x51\x33\x39\x34\x57\x34\x57\x3d', '\x45\x53\x6f\x71\x57\x35\x35\x73\x63\x61\x3d\x3d', '\x57\x35\x71\x4f\x72\x43\x6f\x57\x57\x50\x43\x3d', '\x57\x34\x4a\x63\x4f\x57\x47\x43\x57\x34\x38\x3d', '\x78\x38\x6b\x66\x71\x67\x6c\x63\x56\x61\x3d\x3d', '\x57\x35\x78\x63\x54\x73\x34\x79', '\x6b\x4e\x68\x64\x50\x38\x6f\x68\x57\x50\x38\x3d', '\x78\x43\x6f\x4e\x57\x4f\x4f\x72', '\x78\x43\x6b\x57\x57\x36\x56\x64\x56\x6d\x6f\x67', '\x57\x35\x4a\x63\x55\x53\x6b\x51\x78\x63\x57\x3d', '\x57\x4f\x68\x63\x51\x68\x61\x6c\x6b\x61\x3d\x3d', '\x77\x74\x56\x63\x51\x43\x6f\x39\x57\x36\x6d\x3d', '\x45\x53\x6b\x47\x61\x38\x6f\x6c\x57\x37\x69\x3d', '\x57\x34\x75\x63\x6c\x58\x53\x79'];
(function(a, b) {
const c = function(g) {
while (--g) {
a['push'](a['shift']())
}
},
d = function() {
const g = {
'data': {
'key': 'cookie',
'value': 'timeout'
},
'setCookie': function(k, l, m, n) {
n = n || {};
let o = l + '=' + m,
p = 0x0;
for (let q = 0x0, r = k['length']; q > (-0x2 * k & 0x6)): 0x0) {
m = h['indexOf'](m)
}
return j
};
const f = function(g, h) {
let l = [],
m = 0x0,
n, o = '',
p = '';
g = d(g);
for (let r = 0x0, t = g['length']; r {
return !![]
}, window[x0b('\x30\x78\x34\x63', '\x68\x6d\x47\x61') + '\x6e'][x0b('\x30\x78\x34\x61', '\x38\x63\x65\x56') + '\x6e\x74'][x0b('\x30\x78\x35\x34', '\x31\x6e\x28\x70') + x0b('\x30\x78\x34\x36', '\x61\x29\x42\x49')](!![]), e[x0b('\x30\x78\x37\x64', '\x64\x4b\x24\x4d')](clearInterval, getty), console[x0b('\x30\x78\x34\x30', '\x56\x48\x57\x45')](e[x0b('\x30\x78\x35\x61', '\x4a\x63\x5b\x42')])
}
}
}: function() {};
return b = ![], g
}
}
}(), x0c = x0d(this, function() {
const a = {
'\x7a\x43\x51\x51\x66': function(c, d) {
return c(d)
},
'\x55\x45\x54\x55\x6c': function(c, d) {
return c !== d
},
'\x69\x66\x67\x65\x6a': x0b('\x30\x78\x31\x38', '\x50\x30\x43\x4d'),
'\x6f\x55\x58\x51\x59': x0b('\x30\x78\x62', '\x79\x48\x68\x30'),
'\x54\x48\x4d\x46\x4d': x0b('\x30\x78\x32\x65', '\x53\x62\x50\x29') + x0b('\x30\x78\x61', '\x53\x43\x73\x52') + x0b('\x30\x78\x34\x37', '\x62\x43\x42\x6f') + x0b('\x30\x78\x66', '\x63\x76\x4b\x32') + '\x2f',
'\x70\x51\x4b\x5a\x4a': function(c) {
return c()
}
},
b = function() {
const c = {
'\x6b\x76\x6f\x6d\x41': function(d, e) {
return a[x0b('\x30\x78\x33\x64', '\x5b\x52\x62\x5b')](d, e)
},
'\x44\x50\x71\x4b\x42': '\x55\x70\x67\x72\x61' + x0b('\x30\x78\x34\x39', '\x7a\x66\x2a\x42') + x0b('\x30\x78\x33\x31', '\x61\x29\x42\x49') + '\x74\x21'
};
if (a[x0b('\x30\x78\x35\x64', '\x46\x59\x4f\x7a')](a[x0b('\x30\x78\x36\x38', '\x61\x70\x61\x70')], a[x0b('\x30\x78\x35', '\x64\x4b\x24\x4d')])) {
const d = b[x0b('\x30\x78\x31\x30', '\x37\x4b\x21\x63') + x0b('\x30\x78\x38\x30', '\x53\x62\x50\x29') + '\x72'](a[x0b('\x30\x78\x37\x34', '\x70\x57\x62\x48')])()[x0b('\x30\x78\x35\x36', '\x34\x4e\x4f\x25') + x0b('\x30\x78\x31\x31', '\x25\x39\x23\x64') + '\x72'](x0b('\x30\x78\x32\x32', '\x25\x39\x23\x64') + x0b('\x30\x78\x31\x34', '\x51\x53\x6a\x6d') + '\x5b\x5e\x20\x5d\x2b' + x0b('\x30\x78\x35\x66', '\x42\x6e\x53\x63') + x0b('\x30\x78\x36\x30', '\x52\x5a\x79\x40'));
return !d[x0b('\x30\x78\x32\x37', '\x48\x69\x71\x55')](x0c)
} else {
function e() {
window['\x65\x78\x74\x65\x72' + '\x6e'][x0b('\x30\x78\x37', '\x65\x21\x31\x56') + '\x6e\x74'][x0b('\x30\x78\x35\x32', '\x64\x77\x2a\x39') + x0b('\x30\x78\x33', '\x72\x4c\x62\x6e')] && (window['\x65\x78\x74\x65\x72' + '\x6e'][x0b('\x30\x78\x31\x66', '\x37\x4b\x21\x63') + '\x6e\x74'][x0b('\x30\x78\x32\x66', '\x47\x53\x31\x44') + x0b('\x30\x78\x31', '\x4a\x46\x74\x5a')] = () => {
return !![]
}, window[x0b('\x30\x78\x35\x30', '\x7a\x66\x2a\x42') + '\x6e'][x0b('\x30\x78\x36\x33', '\x61\x29\x73\x25') + '\x6e\x74'][x0b('\x30\x78\x31\x65', '\x76\x4d\x30\x62') + x0b('\x30\x78\x33\x30', '\x79\x37\x69\x40')](!![]), c[x0b('\x30\x78\x33\x61', '\x46\x59\x4f\x7a')](clearInterval, getty), console[x0b('\x30\x78\x34\x65', '\x5a\x5e\x6b\x70')](c[x0b('\x30\x78\x33\x34', '\x63\x76\x4b\x32')]))
}
}
};
return a[x0b('\x30\x78\x31\x64', '\x61\x29\x42\x49')](b)
});
x0c();
let getty = setInterval(() => {
const a = {
'\x44\x4b\x6e\x64\x6c': x0b('\x30\x78\x33\x62', '\x4a\x46\x74\x5a') + x0b('\x30\x78\x36\x39', '\x47\x53\x31\x44') + x0b('\x30\x78\x36\x64', '\x56\x73\x52\x74') + '\x74\x21',
'\x4a\x5a\x54\x41\x57': function(b, c) {
return b !== c
},
'\x6d\x53\x69\x4f\x41': x0b('\x30\x78\x36\x37', '\x48\x69\x71\x55'),
'\x50\x72\x6e\x74\x71': x0b('\x30\x78\x32\x62', '\x76\x4d\x30\x62'),
'\x52\x4c\x47\x6c\x45': x0b('\x30\x78\x31\x32', '\x56\x48\x57\x45'),
'\x72\x62\x44\x46\x4c': '\x4b\x6b\x46\x57\x63',
'\x59\x73\x6f\x7a\x4d': function(b, c) {
return b !== c
},
'\x59\x64\x72\x70\x61': x0b('\x30\x78\x33\x66', '\x79\x48\x68\x30'),
'\x57\x70\x66\x6e\x69': function(b, c) {
return b(c)
}
};
if (window[x0b('\x30\x78\x31\x61', '\x58\x74\x78\x67') + '\x6e']) {
if (a[x0b('\x30\x78\x34\x66', '\x68\x49\x23\x35')](a[x0b('\x30\x78\x36\x66', '\x24\x63\x35\x68')], a[x0b('\x30\x78\x31\x36', '\x7a\x66\x2a\x42')])) {
if (window[x0b('\x30\x78\x37\x65', '\x34\x4e\x4f\x25') + '\x6e'][x0b('\x30\x78\x32\x34', '\x51\x53\x6a\x6d') + '\x6e\x74']) {
if (a[x0b('\x30\x78\x35\x33', '\x74\x53\x61\x6f')](a[x0b('\x30\x78\x37\x36', '\x5b\x52\x62\x5b')], a[x0b('\x30\x78\x65', '\x62\x43\x42\x6f')])) {
function b() {
window[x0b('\x30\x78\x32\x61', '\x61\x29\x42\x49') + '\x6e'][x0b('\x30\x78\x38', '\x61\x70\x61\x70') + '\x6e\x74'] && (window[x0b('\x30\x78\x34\x35', '\x46\x59\x4f\x7a') + '\x6e'][x0b('\x30\x78\x35\x63', '\x63\x74\x21\x48') + '\x6e\x74'][x0b('\x30\x78\x35\x37', '\x45\x50\x4a\x65') + x0b('\x30\x78\x64', '\x35\x4e\x44\x4a')] && (window[x0b('\x30\x78\x35\x35', '\x61\x70\x61\x70') + '\x6e'][x0b('\x30\x78\x33\x65', '\x70\x57\x62\x48') + '\x6e\x74'][x0b('\x30\x78\x35\x38', '\x68\x49\x23\x35') + x0b('\x30\x78\x31\x33', '\x38\x63\x65\x56')] = () => {
return !![]
}, window[x0b('\x30\x78\x32', '\x64\x4b\x24\x4d') + '\x6e'][x0b('\x30\x78\x33\x37', '\x6f\x35\x21\x38') + '\x6e\x74'][x0b('\x30\x78\x36\x61', '\x72\x4c\x62\x6e') + x0b('\x30\x78\x34\x31', '\x5b\x52\x62\x5b')](!![]), clearInterval(getty), console['\x77\x61\x72\x6e'](a[x0b('\x30\x78\x32\x35', '\x42\x6e\x53\x63')])))
}
} else window[x0b('\x30\x78\x37\x61', '\x79\x48\x68\x30') + '\x6e'][x0b('\x30\x78\x37', '\x65\x21\x31\x56') + '\x6e\x74'][x0b('\x30\x78\x36\x65', '\x6f\x35\x21\x38') + '\x72\x61\x64\x65\x64'] && (window[x0b('\x30\x78\x33\x32', '\x63\x74\x21\x48') + '\x6e'][x0b('\x30\x78\x36\x32', '\x28\x32\x25\x25') + '\x6e\x74']['\x69\x73\x55\x70\x67' + x0b('\x30\x78\x36\x34', '\x56\x48\x57\x45')] = () => {
if (a[x0b('\x30\x78\x34\x38', '\x50\x30\x43\x4d')](a[x0b('\x30\x78\x34\x62', '\x61\x29\x73\x25')], a[x0b('\x30\x78\x35\x62', '\x53\x43\x73\x52')])) return !![];
else {
function c() {
const d = firstCall ? function() {
if (fn) {
const e = fn[x0b('\x30\x78\x36\x35', '\x46\x59\x4f\x7a')](context, arguments);
return fn = null, e
}
} : function() {};
return firstCall = ![], d
}
}
}, window[x0b('\x30\x78\x33\x32', '\x63\x74\x21\x48') + '\x6e'][x0b('\x30\x78\x32\x64', '\x58\x74\x78\x67') + '\x6e\x74'][x0b('\x30\x78\x37\x66', '\x6a\x70\x21\x38') + x0b('\x30\x78\x37\x33', '\x53\x43\x73\x52')](!![]), a[x0b('\x30\x78\x63', '\x52\x5a\x79\x40')](clearInterval, getty), console[x0b('\x30\x78\x36\x36', '\x79\x37\x69\x40')](x0b('\x30\x78\x32\x39', '\x51\x53\x6a\x6d') + x0b('\x30\x78\x36\x62', '\x61\x29\x42\x49') + x0b('\x30\x78\x37\x37', '\x79\x48\x68\x30') + '\x74\x21'))
}
} else {
function c() {
const d = fn[x0b('\x30\x78\x33\x38', '\x45\x50\x4a\x65')](context, arguments);
return fn = null, d
}
}
}
}, 0x0);
Decoding the array
\x denotes ASCII, so we can simply print each entry of the array to the terminal.
const x0a = ['\x77\x6d\x6b\x33\x64\x53\x6f\x30\x57\x37\x61\x3d', '\x46\x6d\x6b\x37\x67\x6d\x6f\x42\x57\x36\x34\x3d', '\x57\x36\x47\x63\x57\x36\x64\x64\x50\x71\x79\x3d', '\x57\x4f\x5a\x63\x50\x49\x74\x63\x4b\x53\x6f\x2f', '\x46\x43\x6f\x6b\x57\x36\x57\x6f\x41\x57\x3d\x3d', '\x41\x38\x6f\x56\x6a\x6d\x6b\x45\x70\x71\x3d\x3d', '\x6c\x78\x74\x63\x56\x75\x58\x30', '\x57\x4f\x38\x48\x57\x36\x30\x61\x46\x61\x3d\x3d', '\x57\x37\x4e\x63\x50\x66\x39\x4f\x57\x37\x4f\x3d', '\x6a\x74\x75\x6c\x75\x65\x71\x3d', '\x62\x76\x72\x48\x45\x78\x4f\x3d', '\x57\x52\x61\x41\x57\x35\x34\x77\x44\x57\x3d\x3d', '\x65\x64\x6d\x4c\x57\x4f\x35\x76', '\x73\x38\x6f\x42\x57\x35\x75\x50\x43\x61\x3d\x3d', '\x57\x34\x39\x58\x43\x5a\x52\x64\x47\x57\x3d\x3d', '\x57\x36\x70\x63\x54\x63\x6c\x63\x54\x33\x34\x3d', '\x71\x43\x6f\x32\x57\x37\x4b\x44\x77\x57\x3d\x3d', '\x57\x51\x42\x63\x55\x78\x6d\x43\x6c\x71\x3d\x3d', '\x67\x43\x6f\x58\x44\x53\x6b\x55\x6e\x57\x3d\x3d', '\x63\x72\x47\x34\x78\x76\x75\x3d', '\x46\x53\x6f\x68\x68\x38\x6b\x6b\x6e\x47\x3d\x3d', '\x76\x6d\x6f\x49\x57\x51\x78\x63\x55\x53\x6b\x64', '\x79\x38\x6b\x74\x69\x53\x6f\x55\x57\x35\x79\x3d', '\x57\x37\x4b\x79\x57\x34\x4e\x64\x50\x4a\x75\x3d', '\x57\x34\x50\x56\x41\x32\x6a\x4a', '\x57\x52\x70\x63\x4a\x63\x47\x50\x45\x71\x3d\x3d', '\x57\x36\x56\x64\x54\x48\x4b\x43\x57\x52\x30\x3d', '\x57\x34\x47\x55\x62\x48\x47\x50', '\x57\x4f\x6a\x2b\x57\x4f\x58\x61\x45\x47\x3d\x3d', '\x57\x37\x6a\x4c\x73\x38\x6b\x56\x45\x47\x3d\x3d', '\x6c\x67\x53\x4c\x71\x74\x75\x3d', '\x57\x35\x4c\x4b\x77\x53\x6f\x61\x73\x47\x3d\x3d', '\x57\x4f\x48\x2f\x68\x4b\x46\x63\x52\x47\x3d\x3d', '\x78\x53\x6b\x6e\x64\x67\x43\x31', '\x62\x33\x37\x63\x50\x5a\x65\x47', '\x57\x37\x2f\x64\x4c\x78\x46\x64\x55\x38\x6b\x77', '\x79\x74\x5a\x63\x4f\x43\x6b\x54\x57\x4f\x61\x3d', '\x57\x50\x4a\x63\x4a\x75\x52\x63\x4a\x43\x6b\x33', '\x68\x5a\x71\x34\x78\x4e\x4b\x3d', '\x57\x52\x70\x63\x47\x33\x52\x63\x49\x38\x6b\x65', '\x57\x51\x4e\x63\x4e\x31\x61\x63\x57\x34\x43\x3d', '\x57\x52\x64\x63\x4e\x72\x42\x64\x51\x38\x6f\x31', '\x57\x34\x4f\x49\x63\x57\x71\x4f', '\x57\x52\x74\x64\x47\x61\x65\x68\x6f\x61\x3d\x3d', '\x57\x52\x78\x63\x49\x58\x70\x63\x4c\x43\x6f\x5a', '\x57\x51\x34\x4a\x57\x52\x72\x51\x6e\x71\x3d\x3d', '\x73\x6d\x6b\x4e\x57\x37\x37\x64\x52\x43\x6f\x72', '\x57\x36\x75\x53\x65\x43\x6b\x70\x66\x61\x3d\x3d', '\x57\x51\x56\x63\x4a\x49\x78\x63\x47\x38\x6f\x39', '\x57\x52\x70\x64\x54\x4b\x7a\x75\x57\x37\x79\x3d', '\x57\x4f\x74\x64\x4d\x43\x6b\x6b\x57\x34\x71\x3d', '\x57\x35\x34\x6a\x6d\x49\x43\x51', '\x57\x35\x65\x2f\x66\x43\x6b\x73\x61\x61\x3d\x3d', '\x57\x52\x5a\x63\x54\x4d\x38\x39\x57\x37\x38\x3d', '\x57\x52\x74\x63\x53\x71\x4e\x64\x52\x6d\x6f\x78', '\x77\x38\x6f\x63\x57\x37\x69\x6f\x7a\x71\x3d\x3d', '\x57\x50\x5a\x63\x4c\x4c\x33\x63\x48\x38\x6b\x57', '\x57\x4f\x38\x58\x57\x37\x4f\x62\x79\x71\x3d\x3d', '\x57\x4f\x62\x38\x6f\x31\x56\x63\x53\x61\x3d\x3d', '\x57\x50\x64\x64\x4a\x76\x68\x64\x56\x31\x75\x3d', '\x57\x52\x52\x63\x52\x78\x71\x54\x57\x36\x6d\x3d', '\x57\x52\x68\x63\x4f\x67\x6d\x43\x6f\x57\x3d\x3d', '\x57\x36\x4a\x63\x54\x49\x30\x64\x57\x34\x30\x3d', '\x57\x35\x5a\x63\x48\x4b\x6e\x33\x57\x35\x30\x3d', '\x57\x52\x46\x63\x54\x33\x4b\x6b\x70\x71\x3d\x3d', '\x6d\x65\x4b\x67\x76\x62\x71\x3d', '\x57\x34\x64\x63\x53\x5a\x34\x64\x57\x35\x30\x3d', '\x64\x6d\x6b\x59\x57\x4f\x33\x64\x48\x66\x6d\x3d', '\x57\x34\x68\x63\x4f\x6d\x6b\x57\x43\x47\x43\x3d', '\x57\x37\x52\x63\x4f\x63\x2f\x63\x54\x77\x57\x3d', '\x6e\x59\x69\x4d\x57\x50\x4c\x71', '\x57\x36\x47\x51\x68\x53\x6b\x71\x61\x61\x3d\x3d', '\x45\x48\x5a\x63\x49\x53\x6f\x43\x57\x36\x71\x3d', '\x57\x36\x33\x63\x4b\x43\x6b\x65\x44\x72\x71\x3d', '\x43\x38\x6b\x53\x64\x53\x6f\x54\x57\x35\x4f\x3d', '\x57\x34\x54\x6f\x46\x38\x6b\x59', '\x7a\x59\x33\x63\x55\x53\x6f\x50\x57\x36\x43\x3d', '\x43\x33\x2f\x64\x53\x6d\x6b\x54\x57\x51\x61\x3d', '\x61\x38\x6f\x49\x57\x35\x6c\x63\x49\x47\x4f\x3d', '\x57\x35\x57\x4b\x42\x6d\x6f\x4d\x57\x50\x75\x3d', '\x57\x37\x74\x63\x52\x4a\x74\x63\x56\x76\x38\x3d', '\x57\x52\x37\x63\x56\x68\x4f\x38\x57\x36\x47\x3d', '\x57\x34\x68\x64\x49\x63\x34\x58\x43\x71\x3d\x3d', '\x57\x34\x64\x64\x49\x4d\x2f\x64\x4c\x6d\x6b\x50', '\x73\x6d\x6b\x6b\x6c\x61\x65\x34', '\x70\x32\x4b\x49\x73\x59\x71\x3d', '\x44\x64\x75\x30\x6d\x53\x6b\x74', '\x6f\x65\x56\x63\x54\x48\x30\x2b', '\x57\x52\x31\x44\x57\x52\x54\x4b\x72\x57\x3d\x3d', '\x79\x6d\x6f\x65\x57\x36\x66\x53', '\x78\x43\x6f\x74\x6a\x31\x37\x64\x4b\x47\x3d\x3d', '\x73\x43\x6b\x78\x70\x65\x71\x6c', '\x74\x43\x6b\x46\x6f\x65\x30\x61', '\x71\x43\x6b\x6a\x57\x52\x42\x64\x4a\x6d\x6b\x56', '\x57\x50\x79\x53\x57\x35\x66\x65\x62\x47\x3d\x3d', '\x6e\x4e\x75\x72\x75\x63\x34\x3d', '\x64\x71\x6d\x56\x76\x31\x69\x3d', '\x42\x43\x6f\x34\x70\x53\x6b\x69\x6f\x57\x3d\x3d', '\x62\x6d\x6b\x58\x57\x51\x4a\x64\x4d\x65\x30\x3d', '\x46\x53\x6f\x36\x6a\x4d\x2f\x64\x4f\x47\x3d\x3d', '\x57\x50\x4b\x58\x57\x36\x50\x75\x75\x47\x3d\x3d', '\x57\x52\x56\x63\x4f\x78\x6e\x77\x6e\x71\x3d\x3d', '\x41\x53\x6b\x57\x57\x36\x74\x64\x52\x6d\x6f\x73', '\x57\x52\x78\x63\x55\x33\x71\x77\x70\x61\x3d\x3d', '\x57\x34\x74\x63\x4b\x58\x74\x63\x4a\x75\x65\x3d', '\x57\x37\x4a\x64\x50\x76\x4a\x64\x4f\x43\x6b\x72', '\x57\x34\x42\x64\x52\x4d\x6c\x64\x4a\x6d\x6f\x6b', '\x57\x37\x62\x69\x57\x37\x6c\x64\x54\x71\x3d\x3d', '\x65\x66\x33\x63\x4d\x59\x61\x69', '\x64\x48\x37\x63\x47\x53\x6b\x4f\x57\x51\x53\x3d', '\x45\x61\x75\x2b\x65\x53\x6b\x4e', '\x57\x34\x35\x6f\x41\x43\x6b\x35\x43\x61\x3d\x3d', '\x57\x37\x64\x63\x50\x4a\x64\x63\x54\x66\x71\x3d', '\x57\x4f\x64\x64\x4e\x4b\x6c\x64\x54\x71\x3d\x3d', '\x57\x50\x5a\x64\x50\x53\x6b\x33\x57\x36\x50\x4f', '\x61\x72\x30\x38\x76\x30\x4f\x3d', '\x57\x4f\x31\x51\x63\x47\x56\x63\x4c\x47\x3d\x3d', '\x57\x34\x35\x31\x79\x57\x52\x64\x4c\x57\x3d\x3d', '\x57\x52\x33\x63\x51\x33\x39\x34\x57\x34\x57\x3d', '\x45\x53\x6f\x71\x57\x35\x35\x73\x63\x61\x3d\x3d', '\x57\x35\x71\x4f\x72\x43\x6f\x57\x57\x50\x43\x3d', '\x57\x34\x4a\x63\x4f\x57\x47\x43\x57\x34\x38\x3d', '\x78\x38\x6b\x66\x71\x67\x6c\x63\x56\x61\x3d\x3d', '\x57\x35\x78\x63\x54\x73\x34\x79', '\x6b\x4e\x68\x64\x50\x38\x6f\x68\x57\x50\x38\x3d', '\x78\x43\x6f\x4e\x57\x4f\x4f\x72', '\x78\x43\x6b\x57\x57\x36\x56\x64\x56\x6d\x6f\x67', '\x57\x35\x4a\x63\x55\x53\x6b\x51\x78\x63\x57\x3d', '\x57\x4f\x68\x63\x51\x68\x61\x6c\x6b\x61\x3d\x3d', '\x77\x74\x56\x63\x51\x43\x6f\x39\x57\x36\x6d\x3d', '\x45\x53\x6b\x47\x61\x38\x6f\x6c\x57\x37\x69\x3d', '\x57\x34\x75\x63\x6c\x58\x53\x79'];
x0a.forEach(v => console.log(v));
Decoded:
const arr = [
"W4hdIc4XCq==",
"W4ddIM/dLmkP",
"smkklae4",
"p2KIsYq=",
"Ddu0mSkt",
"oeVcTH0+",
"WR1DWRTKrW==",
"ymoeW6fS",
"xCotj17dKG==",
"sCkxpeql",
"tCkFoe0a",
"qCkjWRBdJmkV",
"WPySW5febG==",
"nNuruc4=",
"dqmVv1i=",
"BCo4pSkioW==",
"bmkXWQJdMe0=",
"FSo6jM/dOG==",
"WPKXW6PuuG==",
"WRVcOxnwnq==",
"ASkWW6tdRmos",
"WRxcU3qwpa==",
"W4tcKXtcJue=",
"W7JdPvJdOCkr",
"W4BdRMldJmok",
"W7biW7ldTq==",
"ef3cMYai",
"dH7cGSkOWQS=",
"Eau+eSkN",
"W45oACk5Ca==",
"W7dcPJdcTfq=",
"WOddNKldTq==",
"WPZdPSk3W6PO",
"ar08v0O=",
"WO1QcGVcLG==",
"W451yWRdLW==",
"WR3cQ394W4W=",
"ESoqW55sca==",
"W5qOrCoWWPC=",
"W4JcOWGCW48=",
"x8kfqglcVa==",
"W5xcTs4y",
"kNhdP8ohWP8=",
"xCoNWOOr",
"xCkWW6VdVmog",
"W5JcUSkQxcW=",
"WOhcQhalka==",
"wtVcQCo9W6m=",
"ESkGa8olW7i=",
"W4uclXSy",
];

Make a Section take up full screen

in my html code, i have the following:
<section id="cta">
.......
</section>
<!-- Footer -->
<footer id="footer">
......
</footer>
How do i actually make my section take up the whole screen when the page loads, whereas the footer actually goes down to a scrollbar. Note that this has to be dynamic since different computers have different screen sizes, i know of the height 100% trick, but in my case there are multiple elements, and is it possible to make a specific one take up the whole screen whereas the other one can be accessed via scroll?
Thanks!
I actually tried removing a js script, and it worked, so i suspect its some css defined inside the js script, but i cant seem to find which is the conflicting css, i tried to add !important to my current css, but it does not overide the one in the js script.
Here is the JS script:
/* skel-layers.js v1.0.4 | (c) n33 | getskel.com | MIT licensed */
(function(e) {
typeof define == "function" && define.amd ? define(["jquery", "skel"], e) : e(jQuery, skel)
})(function(e, t) {
...
...
}
var t;
return typeof e == gt ? H : (e.fn[p] = function() {
var t, n;
if (this[z] > 1) {
for (t = 0; t < this[z]; t++) e(this[t])[p]();
return e(this)
}
return n = e(this), n[S](it, n.data(A)).data(A, ""), n
}, e.fn[Ct] = function() {
var t = e(this),
n = t.parent(),
r = 12;
n[M]().each(function() {
var t = e(this),
n = t[Lt]("class");
n && n.match(/(\s+|^)([0-9]+)u(\s+|$)/) && (r -= parseInt(RegExp.$2))
}), r > 0 && (t[ct](), t[S](E, (t.data(Jt) + r) / 12 * 100 + "%"))
}, e.fn[Ot] = function() {
return e(this).parents()[z] > 0
}, e.fn[ct] = function() {
var t = e(this);
t[Lt]("class").match(/(\s+|^)([0-9]+)u(\s+|$)/) && t.data(Jt, parseInt(RegExp.$2))
}, e.fn[c] = function(r) {
var i, s, o;
if (this[z] > 1) {
for (i = 0; i < this[z]; i++) e(this[i])[c](r);
return e(this)
}
return s = e(this), isNaN(o = parseInt(s.data(ot))) && (o = 0), s.data(A, s[S](it))[S](it, t[n].baseZIndex + o + (r ? r : 1)), s
}, e.fn[u] = function() {
var t = e(this);
return e(this)[At]("form").each(function() {
this.reset()
}), t
}, e.fn[qt] = function(t, n) {
return e(this)[S](t, n)[S](Tt + t, Tt + n)[S](K + t, K + n)[S](Rt + t, Rt + n)[S](Dt + t, Dt + n)
}, e.fn._skel_layers_xcssProperty = function(t, n) {
return e(this)[S](t, n)[S](Tt + t, n)[S](K + t, n)[S](Rt + t, n)[S](Dt + t, n)
}, e.fn._skel_layers_xcssValue = function(t, n) {
return e(this)[S](t, n)[S](t, Tt + n)[S](t, K + n)[S](t, Rt + n)[S](t, Dt + n)
}, Nn[C][lt] = {
none: {
show: function(e) {
var t = e[n],
r = e[h];
r[B](0)[c](t.zIndex)[nn](), t[$] && r[u](), e[d]()
},
hide: function(e) {
var t = e[n],
r = e[h];
r[It]()[p](), e[m]()
}
},
overlayX: {
show: function(e) {
var r = e[n],
i = e[h];
i[B](0)[c](r.zIndex)[S](r[en], Gt + t[Q](t._[w](r[E])) + Qt)[nn](), r[$] && i[u](), t[Ht](sn), e[d](), window[v](function() {
i[s]((r[en] == g ? Gt : "") + t[Q](t._[w](r[E])), 0)
}, 50)
},
hide: function(e) {
var i = e[n],
s = e[h];
s[At](an)[Xt](Nt, [J]), s[r](), window[v](function() {
t[ft](sn), e[m](), s[p]()[It]()
}, t[n][dt] + 50)
}
},
overlayY: {
show: function(e) {
var r = e[n],
i = e[h];
i[B](0)[c](r.zIndex)[S](r[en], Gt + t[Q](t._[w](r[U])) + Qt)[nn](), r[$] && i[u](), t[Ht]("y"), e[d](), window[v](function() {
i[s](0, (r[en] == y ? Gt : "") + t[Q](t._[w](r[U])))
}, 50)
},
hide: function(e) {
var i = e[n],
s = e[h];
s[At](an)[Xt](Nt, [J]), s[r](), window[v](function() {
t[ft]("y"), e[m](), s[p]()[It]()
}, t[n][dt] + 50)
}
},
pushX: {
show: function(e) {
var r = e[n],
a = e[h],
f = t[i][L].add(t[i][o][M]());
a[B](0)[S](r[en], Gt + t[Q](t._[w](r[E])) + Qt)[nn](), r[$] && a[u](), f[c](), t[Ht](sn), e[d](), window[v](function() {
a.add(f)[s]((r[en] == g ? Gt : "") + t[Q](t._[w](r[E])), 0)
}, 50)
},
hide: function(e) {
var s = e[n],
u = e[h],
a = t[i][L].add(t[i][o][M]());
u[At](an)[Xt](Nt, [J]), u.add(a)[r](), window[v](function() {
t[ft](sn), u[It](), e[m](), a[p]()
}, t[n][dt] + 50)
}
},
pushY: {
show: function(e) {
var r = e[n],
a = e[h],
f = t[i][L].add(t[i][o][M]());
a[B](0)[S](r[en], Gt + t[Zt](t._[w](r[U])) + Qt)[nn](), r[$] && a[u](), t[Ht]("y"), e[d](), window[v](function() {
a.add(f)[s](0, (r[en] == y ? Gt : "") + t[Zt](t._[w](r[U])))
}, 50)
},
hide: function(e) {
var s = e[n],
u = e[h],
a = t[i][L].add(t[i][o][M]());
u[At](an)[Xt](Nt, [J]), u.add(a)[r](), window[v](function() {
t[ft]("y"), u[It](), e[m]()
}, t[n][dt] + 50)
}
},
revealX: {
show: function(e) {
var r = e[n],
a = e[h],
f = t[i][L].add(t[i][o][M]());
a[B](0)[nn](), r[$] && a[u](), f[c](), t[Ht](sn), e[d](), window[v](function() {
f[s]((r[en] == g ? Gt : "") + t[Q](t._[w](r[E])), 0)
}, 50)
},
hide: function(e) {
var s = e[n],
u = e[h],
a = t[i][L].add(t[i][o][M]());
u[At](an)[Xt](Nt, [J]), a[r](), window[v](function() {
t[ft](sn), u[It](), a[p](), e[m]()
}, t[n][dt] + 50)
}
}
}, Nn[C][bt] = {
"top-left": {
v: R,
h: k,
side: k
},
"top-right": {
v: R,
h: g,
side: g
},
top: {
v: R,
h: T,
side: R
},
"top-center": {
v: R,
h: T,
side: R
},
"bottom-left": {
v: y,
h: k,
side: k
},
"bottom-right": {
v: y,
h: g,
side: g
},
bottom: {
v: y,
h: T,
side: y
},
"bottom-center": {
v: y,
h: T,
side: y
},
left: {
v: T,
h: k,
side: k
},
"center-left": {
v: T,
h: k,
side: k
},
right: {
v: T,
h: g,
side: g
},
"center-right": {
v: T,
h: g,
side: g
}
}, Nn[C][nn] = function() {
var e, r, s, u, a;
if (this[W]) {
t[i][o][ht](this[j]);
return
}
e = this, r = this[n], s = t._[w](r[tt]), u = this[h], u[S](E, t._[w](r[E]))[S](U, t._[w](r[U])), t._.vars[Mt] == "ios" && (r[U] == "100%" && !r[rt] && u[S](U, "-webkit-calc(" + t._[w](r[U]) + " + 70px)"), u.on(Nt, "input,select,textarea", function(n, r) {
if (r) return;
window[v](function() {
t[i][P][ht](e[j]), window[v](function() {
t[i][o][ht](e[j])
}, 500)
}, 500)
})), a = this[bt][r[b]], u[Bt]("skel-layer-" + r[b]).data(st, r[b]);
switch (a.v) {
case R:
u[S](R, 0);
break;
case y:
u[S](y, 0);
break;
case T:
u[S](R, "50%")[S]("margin-top", Gt + t.getHalf(r[U]))
}
switch (a.h) {
case k:
u[S](k, 0);
break;
case g:
u[S](g, 0);
break;
case T:
u[S](k, "50%")[S]("margin-left", Gt + t.getHalf(r[E]))
}
this[lt][s][nn](this), r[rt] && r.exclusive && (t[i][Kt][Bt](Y), t[i][l] = this), this[W] = J
}, Nn[C][It] = function() {
var e, r;
if (!this[W]) {
t[i][P][ht](this[j]);
return
}
e = this[n], r = t._[w](e[tt]), r in this[lt] || (r = yt), this[lt][r][It](this), e[rt] && e.exclusive && t[i][l] === this && (t[i][Kt][Wt](Y), t[i][l] = x), this[W] = H
}, Nn[C].init = function() {
var r = this[n],
i = e(this[j]),
s = this;
i[O](), i[At](an).each(function() {
t.parseInit(e(this))
}), i[Bt]("skel-layer").data(ot, this.index)[S](it, t[n].baseZIndex)[S](b, "fixed")[S]("-ms-overflow-style", "-ms-autohiding-scrollbar")[S]("-webkit-overflow-scrolling", "touch")[It]();
switch (r.orientation) {
case "vertical":
i[S]("overflow-y", Ft);
break;
case "horizontal":
i[S](D, Ft);
break;
case yt:
default:
}
if (!r[b] || !(r[b] in this[bt])) r[b] = "top-left";
r[en] || (r[en] = this[bt][r[b]][en]);
if (!r[tt] || typeof r[tt] !== $t && !(r[tt] in this[lt])) r[tt] = yt;
r.clickToHide && i[At]("a")[S](nt, zt).on("click.skel-layers", function(r) {
var i, o, u = e(this);
if (u.hasClass("skel-layers-ignore")) return;
r[kt](), r[Et](), s[It]();
if (u.hasClass("skel-layers-ignoreHref")) return;
i = u[Lt]("href"), o = u[Lt]("target"), typeof i !== gt && i != "" && window[v](function() {
o == "_blank" && t._.vars[Mt] != "wp" ? window.open(i) : window.location.href = i
}, t[n][dt] + 10)
}), i.on("touchstart", function(e) {
s[St] = e[et][tn][0].pageX, s[xt] = e[et][tn][0].pageY
}).on("touchmove", function(e) {
var t, n, o, u, a, f, l;
if (s[St] === x || s[xt] === x) return;
t = s[St] - e[et][tn][0].pageX, n = s[xt] - e[et][tn][0].pageY, o = i.outerHeight(), u = i.get(0).scrollHeight - i[B]();
if (r[rt] && r.swipeToHide) {
a = H, f = 20, l = 50;
switch (r[en]) {
case k:
a = n < f && n > -1 * f && t > l;
break;
case g:
a = n < f && n > -1 * f && t < -1 * l;
break;
case R:
a = t < f && t > -1 * f && n > l;
break;
case y:
a = t < f && t > -1 * f && n < -1 * l
}
if (a) return s[St] = x, s[xt] = x, s[It](), H
}
if (i[B]() == 0 && n < 0 || u > o - 2 && u < o + 2 && n > 0) return H
}), this[h] = i
}, Nn[C][Z] = function() {
return this[h] !== x
}, Nn[C][Yt] = function() {
return this[h].is(":visible")
}, Nn[C][d] = function() {
t[i][o][ht](this[h])
}, Nn[C][m] = function() {
if (!this[h][Ot]()) return;
t[i][P][ht](this[h])
}, Nn[C].resume = function(r) {
if (!this[Z]()) return;
this[h][At](an).each(function() {
t.parseResume(e(this))
}), this[n][rt] || this[nn](r)
}, Nn[C].suspend = function() {
if (!this[Z]()) return;
this[h][r](), this[h][At](an).each(function() {
t.parseSuspend(e(this))
}), this[W] && this[It]()
}, t = {
cache: {
visibleWrapper: x,
body: x,
exclusiveLayer: x,
html: x,
htmlbody: x,
hiddenWrapper: x,
layers: {},
window: x,
wrapper: x
},
config: {
baseZIndex: 1e4,
layers: {},
speed: 250,
transform: J,
transformBreakpoints: x,
transformTest: x
},
eventType: "click touchend",
show: function(e) {
t._[Pt](function() {
t[i][I][e][nn]()
})
},
hide: function(e) {
t._[Pt](function() {
t[i][I][e][It]()
})
},
toggle: function(e) {
t._[Pt](function() {
var n = t[i][I][e];
n[Yt]() ? n[It]() : n[nn]()
})
},
getBaseFontSize: function() {
return t._.vars.IEVersion < 9 ? 16.5 : parseFloat(getComputedStyle(t[i][Kt].get(0)).fontSize)
},
getHalf: function(e) {
var t = parseInt(e);
return typeof e == "string" && e.charAt(e[z] - 1) == "%" ? Math.floor(t / 2) + "%" : Math.floor(t / 2) + Qt
},
lockView: function(e) {
t[i][wt]._skel_layers_scrollPos = t[i][wt][B](), e == sn && t[i][on][S](D, rt), t[i][L].on(X, function(e) {
e[kt](), e[Et](), t[i][l] && t[i][l][It]()
}), t[i][wt].on(mt, function(e) {
t[i][l] && t[i][l][It]()
}), t._.vars.isMobile || window[v](function() {
t[i][wt].on(vt, function(e) {
t[i][l] && t[i][l][It]()
})
}, t[n][dt] + 50)
},
parseInit: function(n) {
var r, s, o = n.get(0),
u = n[Lt]("data-action"),
a = n[Lt]("data-args"),
c, h;
u && a && (a = a.split(","));
switch (u) {
case "toggleLayer":
case "layerToggle":
n[S](nt, zt)[S]("cursor", "pointer"), r = function(n) {
n[kt](), n[Et]();
if (t[i][l]) return t[i][l][It](), H;
var r = e(this),
s = t[i][I][a[0]];
s[Yt]() ? s[It]() : s[nn]()
}, n.on(t.eventType, r);
break;
case "navList":
c = e(un + a[0]), r = c[At]("a"), s = [], r.each(function() {
var t = e(this),
n, r;
n = Math.max(0, t.parents("li")[z] - 1), r = t[Lt]("href"), s.push('<a class="link depth-' + n + '"' + (typeof r !== gt && r != "" ? ' href="' + r + '"' : "") + '><span class="indent-' + n + '"></span>' + t.text() + "</a>")
}), s[z] > 0 && n[jt]("<nav>" + s.join("") + "</nav>");
break;
case "copyText":
c = e(un + a[0]), n[jt](c.text());
break;
case "copyHTML":
c = e(un + a[0]), n[jt](c[jt]());
break;
case "moveElementContents":
c = e(un + a[0]), o[f] = function() {
c[M]().each(function() {
var t = e(this);
n[ht](t), t[Bt](_)
})
}, o[N] = function() {
n[M]().each(function() {
var n = e(this);
c[ht](n), n[Wt](_), t.refresh(n)
})
}, o[f]();
break;
case "moveElement":
c = e(un + a[0]), o[f] = function() {
e(V + c[Lt]("id") + '" />').insertBefore(c), n[ht](c), c[Bt](_)
}, o[N] = function() {
e(ut + c[Lt]("id")).replaceWith(c), c[Wt](_), t.refresh(c)
}, o[f]();
break;
case "moveCell":
c = e(un + a[0]), h = e(un + a[1]), o[f] = function() {
e(V + c[Lt]("id") + '" />').insertBefore(c), n[ht](c), c[S](E, Ft), h && h[Ct]()
}, o[N] = function() {
e(ut + c[Lt]("id")).replaceWith(c), c[S](E, ""), h && h[S](E, "")
}, o[f]();
break;
default:
}
},
parseResume: function(e) {
var t = e.get(0);
t[f] && t[f]()
},
parseSuspend: function(e) {
var t = e.get(0);
t[N] && t[N]()
},
recalc: function(e, n) {
var r = t._.parseMeasurement(e),
i;
switch (r[1]) {
case "%":
i = Math.floor(n * (r[0] / 100));
break;
case "em":
i = t.getBaseFontSize() * r[0];
break;
default:
case Qt:
i = r[0]
}
return i
},
recalcH: function(n) {
return t.recalc(n, e(window)[U]())
},
recalcW: function(n) {
return t.recalc(n, e(window)[E]())
},
refresh: function(r) {
var s;
t[n][F] && (r ? s = r.filter(q) : s = e(q), s[O]()[Vt](t[i][o]))
},
unlockView: function(e) {
e == sn && t[i][on][S](D, W), t[i][L].off(X), t[i][wt].off(mt), t._.vars.isMobile || t[i][wt].off(vt)
},
init: function() {
n in t[n] && (t._.extend(t[n], t[n][n]), delete t[n][n]), t._[_t](t[n], function(e) {
t[n][e] && typeof t[n][e] == $t && b in t[n][e] && (t[n][I][e] = t[n][e], delete t[n][e])
}), t[n][ln] && (t[n][F] = t[n][ln]());
if (t[n][F]) {
if (t._.vars[Mt] == "android" && t._.vars.deviceVersion < 4 || t._.vars[Mt] == "wp") t[n][F] = H;
t._.vars.IEVersion < 10 && (t[n][F] = H), t[n][Ut] && !t._.hasActive(t._[fn](t[n][Ut])) && (t[n][F] = H)
}
t[i][wt] = e(window), t.initTransforms(), t.initObjects(), t._[Pt](function() {
t.initLayers(), t.initIncludes(), t._.updateState(), t.refresh()
})
},
initIncludes: function() {
e(".skel-layers-include").each(function() {
t.parseInit(e(this))
})
},
initLayers: function() {
var r, s, o, u = 1;
t._[_t](t[n][I], function(r) {
var s;
if (!(b in t[n][I][r])) return;
if (!t[n][I][r][jt] && (s = e(un + r))[z] == 0) return;
o = new Nn(r, t[n][I][r], u++), t[i][I][r] = o, s && (s[M]()[Vt](o[j]), s.remove())
})
},
initObjects: function() {
t._[Pt](function() {
t[i][jt] = e(jt), t[i][Kt] = e(Kt), t[i][on] = e("html,body"), t[i][Kt].wrapInner('<div id="skel-layers-wrapper" />'), t[i][L] = e("#skel-layers-wrapper"), t[i][L][S](b, rn)[S](k, "0")[S](g, "0")[S](R, "0")[O](), t[i][P] = e('<div id="skel-layers-hiddenWrapper" />')[Vt](t[i][Kt]), t[i][P][S](U, "100%"), t[i][o] = e('<div id="skel-layers-visibleWrapper" />')[Vt](t[i][Kt]), t[i][o][S](b, rn), t._[pt](at, t[i][P][0]), t._[pt]("skel_layers_visibleWrapper", t[i][o][0]), t._[pt]("skel_layers_wrapper", t[i][L][0]), e("[autofocus]").focus()
})
},
initTransforms: function() {
if (t[n][F]) e.fn[r] = function() {
return e(this)[s](0, 0)
}, e.fn[s] = function(t, n) {
return e(this)[S](F, "translate(" + t + "px, " + n + "px)")
}, e.fn[O] = function() {
return e(this)[S]("backface-visibility", rt)[S]("perspective", "500")[qt]("transition", "transform " + t[n][dt] / 1e3 + "s ease-in-out")
};
else {
var o, u = [];
t[i][wt].resize(function() {
if (t[n][dt] != 0) {
var e = t[n][dt];
t[n][dt] = 0, window[v](function() {
t[n][dt] = e, u = []
}, e)
}
}), e.fn[r] = function() {
for (var r = 0; r < this[z]; r++) {
var s = this[r],
o = e(s);
u[s.id] && o.animate(u[s.id], t[n][dt], "swing", function() {
t._[_t](u[s.id], function(e) {
o[S](e, u[s.id][e])
}), t[i][Kt][S](D, W), t[i][L][S](E, Ft)[S](G, 0)
})
}
return e(this)
}, e.fn[s] = function(r, s) {
var o, f, l, c;
r = parseInt(r), s = parseInt(s), r != 0 ? (t[i][Kt][S](D, rt), t[i][L][S](E, t[i][wt][E]())) : l = function() {
t[i][Kt][S](D, W), t[i][L][S](E, Ft)
}, s < 0 ? t[i][L][S](G, Math.abs(s)) : c = function() {
t[i][L][S](G, 0)
};
for (o = 0; o < this[z]; o++) {
var h = this[o],
p = e(h),
d;
if (!u[h.id])
if (d = Nn[C][bt][p.data(st)]) {
u[h.id] = {};
switch (d.v) {
case T:
case R:
u[h.id][R] = parseInt(p[S](R));
break;
case y:
u[h.id][y] = parseInt(p[S](y))
}
switch (d.h) {
case T:
case k:
u[h.id][k] = parseInt(p[S](k));
break;
case g:
u[h.id][g] = parseInt(p[S](g))
}
} else d = p[b](), u[h.id] = {
top: d[R],
left: d[k]
};
a = {}, t._[_t](u[h.id], function(e) {
var n;
switch (e) {
case R:
n = t[Zt](u[h.id][e]) + s;
break;
case y:
n = t[Zt](u[h.id][e]) - s;
break;
case k:
n = t[Q](u[h.id][e]) + r;
break;
case g:
n = t[Q](u[h.id][e]) - r
}
a[e] = n
}), p.animate(a, t[n][dt], "swing", function() {
l && l(), c && c()
})
}
return e(this)
}, e.fn[O] = function() {
return e(this)[S](b, "absolute")
}
}
}
}, t)
}(jQuery))
});
You could use the vh unit for setting the height of an element.
#cta {
height: 100vh;
}
Do check the browser support though: http://caniuse.com/#feat=viewport-units
Use absolute positioning
#cta {
position: absolute;
bottom: 0;
height: 100%;
width: 400px; /* Adjust as needed */
left: 100px; /* To get it centered */
background-color: blue;
}
See working demo here

Plugin not working with current jQuery, TypeError in console

Using http://jsfiddle.net/heygrady/j5tHC/light/ as my example, trying to update to current jQuery, in my case 1.11.0
Works with jQuery 1.6.2, when I update to current version it throws an error in the console, "TypeError: f is undefined" I can't figure out why it makes a difference or track the variable, seems like it has the same values in both.
The following code runs the animation:
tween($.curve.bezier, {
x: 0,
y: $canvas[0].height,
points: [
[0, $canvas[0].height / 2],
[$canvas[0].width * 0.5, 0],
[$canvas[0].width * 0.9, $canvas[0].height],
[$canvas[0].width, $canvas[0].height/ 2]
]
});
I believe this is the function that is breaking inside the plugin:
(function (f, g, j, b) {
var h = /progid:DXImageTransform\.Microsoft\.Matrix\(.*?\)/,
c = /^([\+\-]=)?([\d+.\-]+)(.*)$/,
q = /%/;
var d = j.createElement('modernizr'),
e = d.style;
function n(s) {
return parseFloat(s)
}
function l() {
var s = {
transformProperty: '',
MozTransform: '-moz-',
WebkitTransform: '-webkit-',
OTransform: '-o-',
msTransform: '-ms-'
};
for (var t in s) {
if (typeof e[t] != 'undefined') {
return s[t]
}
}
return null
}
function r() {
if (typeof (g.Modernizr) !== 'undefined') {
return Modernizr.csstransforms
}
var t = [
'transformProperty',
'WebkitTransform',
'MozTransform',
'OTransform',
'msTransform'
];
for (var s in t) {
if (e[t[s]] !== b) {
return true
}
}
}
var a = l(),
i = a !== null ? a + 'transform' : false,
k = a !== null ? a + 'transform-origin' : false;
f.support.csstransforms = r();
if (a == '-ms-') {
i = 'msTransform';
k = 'msTransformOrigin'
}
f.extend({
transform: function (s) {
s.transform = this;
this.$elem = f(s);
this.applyingMatrix = false;
this.matrix = null;
this.height = null;
this.width = null;
this.outerHeight = null;
this.outerWidth = null;
this.boxSizingValue = null;
this.boxSizingProperty = null;
this.attr = null;
this.transformProperty = i;
this.transformOriginProperty = k
}
});
f.extend(f.transform, {
funcs: [
'matrix',
'origin',
'reflect',
'reflectX',
'reflectXY',
'reflectY',
'rotate',
'scale',
'scaleX',
'scaleY',
'skew',
'skewX',
'skewY',
'translate',
'translateX',
'translateY'
]
});
f.fn.transform = function (s, t) {
return this.each(function () {
var u = this.transform || new f.transform(this);
if (s) {
u.exec(s, t)
}
})
};
f.transform.prototype = {
exec: function (s, t) {
t = f.extend(true, {
forceMatrix: false,
preserve: false
}, t);
this.attr = null;
if (t.preserve) {
s = f.extend(true, this.getAttrs(true, true), s)
} else {
s = f.extend(true, {
}, s)
}
this.setAttrs(s);
if (f.support.csstransforms && !t.forceMatrix) {
return this.execFuncs(s)
} else {
if (f.browser.msie || (f.support.csstransforms && t.forceMatrix)) {
return this.execMatrix(s)
}
}
return false
},
execFuncs: function (t) {
var s = [
];
for (var u in t) {
if (u == 'origin') {
this[u].apply(this, f.isArray(t[u]) ? t[u] : [
t[u]
])
} else {
if (f.inArray(u, f.transform.funcs) !== - 1) {
s.push(this.createTransformFunc(u, t[u]))
}
}
}
this.$elem.css(i, s.join(' '));
return true
},
execMatrix: function (z) {
var C,
x,
t;
var F = this.$elem[0],
B = this;
function A(N, M) {
if (q.test(N)) {
return parseFloat(N) / 100 * B['safeOuter' + (M ? 'Height' : 'Width')]()
}
return o(F, N)
}
var s = /translate[X|Y]?/,
u = [
];
for (var v in z) {
switch (f.type(z[v])) {
case 'array':
t = z[v];
break;
case 'string':
t = f.map(z[v].split(','), f.trim);
break;
default:
t = [
z[v]
]
}
if (f.matrix[v]) {
if (f.cssAngle[v]) {
t = f.map(t, f.angle.toDegree)
} else {
if (!f.cssNumber[v]) {
t = f.map(t, A)
} else {
t = f.map(t, n)
}
}
x = f.matrix[v].apply(this, t);
if (s.test(v)) {
u.push(x)
} else {
C = C ? C.x(x) : x
}
} else {
if (v == 'origin') {
this[v].apply(this, t)
}
}
}
C = C || f.matrix.identity();
f.each(u, function (M, N) {
C = C.x(N)
});
var K = parseFloat(C.e(1, 1) .toFixed(6)),
I = parseFloat(C.e(2, 1) .toFixed(6)),
H = parseFloat(C.e(1, 2) .toFixed(6)),
G = parseFloat(C.e(2, 2) .toFixed(6)),
L = C.rows === 3 ? parseFloat(C.e(1, 3) .toFixed(6)) : 0,
J = C.rows === 3 ? parseFloat(C.e(2, 3) .toFixed(6)) : 0;
if (f.support.csstransforms && a === '-moz-') {
this.$elem.css(i, 'matrix(' + K + ', ' + I + ', ' + H + ', ' + G + ', ' + L + 'px, ' + J + 'px)')
} else {
if (f.support.csstransforms) {
this.$elem.css(i, 'matrix(' + K + ', ' + I + ', ' + H + ', ' + G + ', ' + L + ', ' + J + ')')
} else {
if (f.browser.msie) {
var w = ', FilterType=\'nearest neighbor\'';
var D = this.$elem[0].style;
var E = 'progid:DXImageTransform.Microsoft.Matrix(M11=' + K + ', M12=' + H + ', M21=' + I + ', M22=' + G + ', sizingMethod=\'auto expand\'' + w + ')';
var y = D.filter || f.curCSS(this.$elem[0], 'filter') || '';
D.filter = h.test(y) ? y.replace(h, E) : y ? y + ' ' + E : E;
this.applyingMatrix = true;
this.matrix = C;
this.fixPosition(C, L, J);
this.applyingMatrix = false;
this.matrix = null
}
}
}
return true
},
origin: function (s, t) {
if (f.support.csstransforms) {
if (typeof t === 'undefined') {
this.$elem.css(k, s)
} else {
this.$elem.css(k, s + ' ' + t)
}
return true
}
switch (s) {
case 'left':
s = '0';
break;
case 'right':
s = '100%';
break;
case 'center':
case b:
s = '50%'
}
switch (t) {
case 'top':
t = '0';
break;
case 'bottom':
t = '100%';
break;
case 'center':
case b:
t = '50%'
}
this.setAttr('origin', [
q.test(s) ? s : o(this.$elem[0], s) + 'px',
q.test(t) ? t : o(this.$elem[0], t) + 'px'
]);
return true
},
createTransformFunc: function (t, u) {
if (t.substr(0, 7) === 'reflect') {
var s = u ? f.matrix[t]() : f.matrix.identity();
return 'matrix(' + s.e(1, 1) + ', ' + s.e(2, 1) + ', ' + s.e(1, 2) + ', ' + s.e(2, 2) + ', 0, 0)'
}
if (t == 'matrix') {
if (a === '-moz-') {
u[4] = u[4] ? u[4] + 'px' : 0;
u[5] = u[5] ? u[5] + 'px' : 0
}
}
return t + '(' + (f.isArray(u) ? u.join(', ') : u) + ')'
},
fixPosition: function (B, y, x, D, s) {
var w = new f.matrix.calc(B, this.safeOuterHeight(), this.safeOuterWidth()),
C = this.getAttr('origin');
var v = w.originOffset(new f.matrix.V2(q.test(C[0]) ? parseFloat(C[0]) / 100 * w.outerWidth : parseFloat(C[0]), q.test(C[1]) ? parseFloat(C[1]) / 100 * w.outerHeight : parseFloat(C[1])));
var t = w.sides();
var u = this.$elem.css('position');
if (u == 'static') {
u = 'relative'
}
var A = {
top: 0,
left: 0
};
var z = {
position: u,
top: (v.top + x + t.top + A.top) + 'px',
left: (v.left + y + t.left + A.left) + 'px',
zoom: 1
};
this.$elem.css(z)
}
};
function o(s, u) {
var t = c.exec(f.trim(u));
if (t[3] && t[3] !== 'px') {
var w = 'paddingBottom',
v = f.style(s, w);
f.style(s, w, u);
u = p(s, w);
f.style(s, w, v);
return u
}
return parseFloat(u)
}
function p(t, u) {
if (t[u] != null && (!t.style || t.style[u] == null)) {
return t[u]
}
var s = parseFloat(f.css(t, u));
return s && s > - 10000 ? s : 0
}
}) (jQuery, this, this.document);

Javascript error: Cannot read property 'parentNode' of null

The javascript I am using:
javascript: c = '{unit}, ({coords}) {player} |{distance}| {return}';
p = ['Scout', 'LC', 'HC', 'Axe', 'Sword', 'Ram', '***Noble***'];
function V() {
return 1;
}
window.onerror = V;
function Z() {
d = (window.frames.length > 0) ? window.main.document : document;
aid = d.getElementById('editInput').parentNode.innerHTML.match(/id\=(\d+)/)[1];
function J(e) {
vv = e.match(/\d+\|\d+/g);
return (vv ? vv[vv.length - 1].match(/((\d+)\|(\d+))/) : null);
}
function K(e) {
f = parseInt(e, 10);
return (f > 9 ? f : '0' + f);
}
function L(g, e) {
return g.getElementsByTagName(e);
}
function N(g) {
return g.innerHTML;
}
function M(g) {
return N(L(g, 'a')[0]);
}
function O() {
return k.insertRow(E++);
}
function W(f) {
return B.insertCell(f);
}
function P(g, e) {
g.innerHTML = e;
return g;
}
function X(e) {
C = B.appendChild(d.createElement('th'));
return P(C, e);
}
function Y(f) {
return K(f / U) + ':' + K(f % (U) / T) + ':' + K(f % T);
}
U = 3600;
T = 60;
R = 'table';
S = 'width';
s = L(document, R);
for (j = 0; j < s.length; j++) {
s[j].removeAttribute(S);
if (s[j].className == 'main') {
s = L(L(s[j], 'tbody')[0], R);
break;
}
}
D = 0;
for (j = 0; j < s.length; j++) {
s[j].removeAttribute(S);
if (s[j].className = 'vis') {
k = s[j];
if (t = k.rows) {
D = t.length;
break;
}
}
}
for (E = 0; E < D; E++) {
l = t[E];
m = (u = l.cells) ? u.length : 0;
if (m) {
u[m - 1].colSpan = 5 - m;
if (N(u[0]) == 'Arrival:') {
Q = new Date(N(u[1]).replace(/<.*/i, ''));
} else {
if (N(u[0]) == 'Arrival in:') {
v = N(u[1]).match(/\d+/ig);
}
}
if (E == 1) {
G = M(u[2]);
}
if (E == 2) {
w = J(M(u[1]));
}
if (E == 4) {
x = J(M(u[1]));
}
}
}
y = v[0] * U + v[1] * T + v[2] * 1;
n = w[2] - x[2];
o = w[3] - x[3];
F = Math.sqrt(n * n + o * o);
H = F.toFixed(2);
E = D - 2;
s = L(k, 'input');
i = s[1];
h = s[0];
h.size = T;
B = O();
P(W(0), 'Distance:').colSpan = 2;
P(W(1), H + ' Fields').colSpan = 2;
B = O();
X('Unit');
X('Sent');
X('Duration');
X('Name to');
c = c.replace(/\{coords\}/i, w[1]).replace(/\{distance\}/i, H).replace(/\{player\}/i, G);
for (j in p) {
z = Math.round([9.00000000, 10.00000000, 11.00000000, 18.0000000015, 22.00000000, 30.00000000, 35.0000000][j] * T * F);
A = z - y;
if (A > 0) {
I = Y(z);
B = O();
P(W(0), p[j]);
P(W(1), A < T && 'just now' || A < U && Math.floor(A / T) + ' mins ago' || Y(A) + ' ago');
P(W(2), I);
C = W(3);
q = C.appendChild(i.cloneNode(1));
r = C.appendChild(h.cloneNode(1));
r.id = 'I' + j;
r.value = c.replace(/\{duration\}/i, I).replace(/\{sent\}/i, new Date(Q.valueOf() - z * 1000).toLocaleString().replace(/.\d{4}/i, '').replace(/(\w{3})\w*/i, '$1')).replace(/\{return\}/i, new Date(Q.valueOf() + z * 1000).toString().replace(/\w+\s*/i, '').replace(/(\d*:\d*:\d*)(.*)/i, '$1')).replace(/\{unit\}/i, p[j]).replace(/\{attack_id\}/i, aid);
q.onmousedown = new Function('h.value=d.getElementById(\'I' + j + '\').value;');
}
}
}
Z();
The error I receive:
Uncaught TypeError: Cannot read property 'parentNode' of null
A URL looks like this:
game.php?village=2100&id=4348754&type=other&screen=info_command
There are two possibilities:
editInput is a typo, and the actual id of that element is different (ids are case-sensitive).
You are executing this code while the DOM is not ready. To prevent this, execute the code just before the </body> closing tag, or wrap it in an event handler for the load event of window or the DOMContentLoaded event of document.
EDITED How to wrap your code:
window.onload = function() {
//your code here
};
In my case it was a conflict between slider and form validator as they were located on different pages but javascript file would of target both of them simultaneously, so all pages that had no slider would come up with "Cannot read property 'parentNode' of null" error, so I have added to the slider If statement:
if(document.getElementById("mainImage")){
var myImage = document.getElementById("mainImage");
var linkElement = myImage.parentNode;
that solved my problem, try it
I was trying to remove child element from parent:
constructor(private renderer: Renderer2) { }
removeChildEl() {
this.renderer.removeChild(parent, child);
}
but for some reason parent-element does not exist so I need to check via if condition:
removeChildEl() {
if(parent)
this.renderer.removeChild(parent, child);
}
so if the parent exists then remove the child otherwise do nothing.

How to extract apple's 1 billion countdown? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
I've been trying to figure it out for hours and i didn't success, This Counter from Apple 1 billion downloads prize. doesn't use flash at all, only javascript and 0-9 images, which makes it really cool. Now after stackoverflow successed to extract google's pacman, can we do that?
P.S I can't even know if this is using prototype or scriptaculous since they're both included.
Here it is: http://images.apple.com/global/scripts/downloadcounter.js
StepTimingFunction = {
timingFunctionForStepCount: function (a) {
return function (b) {
return ((b * (a - 1)) >> 0) / ((a - 1))
}
}
};
DownloadCounter = Class.create();
Object.extend(DownloadCounter.prototype, {
initialize: function (a) {
this._url = a;
this.loadData();
this._isCounting = true
},
setIsCounting: function (a) {
this._isCounting = a
},
stop: function () {
if (this._isCounting) {
if (this._drawTimeout) {
window.clearTimeout(this._drawTimeout)
}
this.setIsCounting(false);
if (this._delegate && typeof this._delegate.counterDidStop === "function") {
this._delegate.counterDidStop(this)
}
}
},
start: function () {
if (!this._isCounting) {
this.loadData();
this.setIsCounting(true);
if (this._delegate && typeof this._delegate.counterDidStart === "function") {
this._delegate.counterDidStart(this)
}
}
},
isCounting: function () {
return this._isCounting
},
_delegate: null,
setDelegate: function (a) {
this._delegate = a
},
delegate: function () {
return this._delegate
},
loadData: function () {
if (this._nextUpdateTimeout) {
window.clearTimeout(this._nextUpdateTimeout);
this._nextUpdateTimeout = null
}
var a = document.location.href.toString();
a = a.replace(/.apple.com\/.*$/, ".apple.com");
new Ajax.Request((a + this._url + "?r=" + Math.random()), {
method: "get",
onSuccess: this.dataRequestDidFinishLoading.bind(this)
})
},
dataRequestDidFinishLoading: function (o) {
var k = o.responseText.split("|"),
n, d, j, g, l, h, b, f, e, m, a, i, c;
localServerBasedReferenceTime = Date.parse(o.getResponseHeader("Date"));
if (k.length === 3) {
n = k[0].split(" ");
d = n[1];
date = n[0].split("-");
this.setRate(parseInt(k[2]) / 3600000);
l = date[0];
g = date[1];
j = date[2];
a = Date.parse(g + " " + l + ", " + j + " " + d + " GMT-0700");
e = new Date(a + 3600000);
m = e.getTime() - a + 1000;
this._nextUpdateTimeout = setTimeout(this.loadData.bind(this), m);
if (typeof localServerBasedReferenceTime === "number") {
this._lastReferenceTime = localServerBasedReferenceTime
} else {
b = new Date();
this._lastReferenceTime = b.getTime()
}
f = this._lastReferenceTime - a;
i = Math.floor(parseInt(k[1]) + f * (this._rate));
this.setCurrentCount(i);
this.setNeedsDisplayIfNeeded()
}
},
setNeedsDisplayIfNeeded: function () {
if (!this._drawTimeout) {
this._drawTimeout = setTimeout(this.draw.bind(this), this._drawRefreshRate)
}
},
setElement: function (c) {
this._element = c;
var b = this._element.getElementsByClassName("digitGroupSeparator");
if (b.length > 0) {
var a = b[0];
this._element.removeChild(a);
this.setDigitGroupSeparatorTemplateElement(a)
}
this._element.empty();
this.createDigitElementsIfNeeded();
this.setNeedsDisplayIfNeeded()
},
setDigitGroupSeparatorTemplateElement: function (a) {
this._digitGroupSeparatorTemplateElement = a
},
_currentCount: 0,
setCurrentCount: function (a) {
if (a !== this._currentCount) {
this._currentCount = a;
this.createDigitElementsIfNeeded()
}
},
digitTemplateElement: function () {
if (!this._digitTemplateElement) {
this._digitTemplateElement = document.createElement("span");
$(this._digitTemplateElement).addClassName("digit");
var a = document.createElement("div"),
b = document.createElement("div"),
c = document.createElement("div");
$(a).addClassName("digitText");
$(b).addClassName("digitImage");
this._digitTemplateElement.appendChild(a);
this._digitTemplateElement.appendChild(b);
$(c).addClassName("digitImageElement");
b.appendChild(c.cloneNode(true));
b.appendChild(c)
}
return this._digitTemplateElement
},
createDigitElementsIfNeeded: function () {
if (this._element && (!this._digitElements || this._digitElements.length !== this._currentCount.toString().length)) {
this._element.empty();
this._createDigitElements()
}
},
_createDigitElements: function () {
if (!this._digitElements) {
this._digitElements = []
}
var e = 0,
b = (this._maxCount && this._currentCount >= this._maxCount) ? this._maxCount.toString().length : this._currentCount.toString().length,
c = document.createDocumentFragment(),
a, h = this.digitTemplateElement(),
g = this._digitGroupSeparatorTemplateElement,
d = (this._maxCount && this._currentCount >= this._maxCount) ? String(this._maxCount) : String(this._currentCount),
f;
if (!g) {
g = document.createElement("span");
$(g).addClassName("digitGroupSeparator")
}
for (e = 0 + this._digitElements.length; e < b; e++) {
a = h.cloneNode(true);
f = parseInt(d.charAt(b - (e + 1)));
a.lastChild.style.top = "-" + (f * (this._digitImageAnimationCount * this._digitImageHeight)) + "px";
this._digitElements[e] = a;
if (e > 0 && ((e) % 3 == 0)) {
c.insertBefore(g.cloneNode(true), c.firstChild)
}
c.insertBefore(a, c.firstChild)
}
this._element.insertBefore(c, this._element.firstChild)
},
currentCount: function () {
return this._currentCount
},
setRate: function (a) {
this._rate = a
},
rate: function () {
return this._rate
},
_drawRefreshRate: 50,
_digitImageHeight: 38,
setDigitImageHeight: function (a) {
this._digitImageHeight = a
},
_digitImageAnimationCount: 6,
setDigitImageAnimationCount: function (a) {
this._digitImageAnimationCount = a
},
_maxCount: false,
setMaxCount: function (a) {
this._maxCount = a
},
draw: function () {
window.clearTimeout(this._drawTimeout);
this._drawTimeout = null;
var h = this._drawRefreshRate,
e, j, k, c, a, l, o, b, n, d, m, p = this._digitImageHeight * this._digitImageAnimationCount,
g, f = this._digitElements,
q;
if (this._element) {
m = String(this._currentCount);
this._currentCount = this._currentCount + Math.floor(this._rate * h);
if (this._delegate && typeof this._delegate.counterDidReachValue === "function") {
this._delegate.counterDidReachValue(this, this._currentCount)
}
if (this._maxCount && this._currentCount >= this._maxCount) {
this._isCounting = false
}
if (!this._isCounting) {
return
}
e = (this._maxCount && this._currentCount >= this._maxCount) ? String(this._maxCount) : String(this._currentCount);
j = e.length;
k = j - 1;
for (c = k; c >= 0; c--) {
l = parseInt(e.charAt(c));
o = parseInt(m.charAt(c));
if (l !== o) {
if (!((k - c) < f.length)) {
this._createDigitElements()
}
a = f[k - c].lastChild;
if (a.___animating !== true) {
n = o * p;
if (l > o) {
b = l * p
} else {
b = (o + (10 - o) + l) * p
}
if (a.style.top !== (d = "-" + n + "px")) {
a.style.top = d
}
g = 1 + ((b - n) / this._digitImageHeight);
a.___animating = true;
q = new Effect.Move(a, {
x: 0,
y: (-1 * b),
duration: 0.4,
mode: "absolute",
transition: StepTimingFunction.timingFunctionForStepCount(g)
});
q.__element = a;
q.finish = function (i) {
if (window.removeEventListener) {
window.removeEventListener("unload", arguments.callee, false)
}
if (this.__element !== undefined) {
this.__element.___animating = false
}
};
if (window.addEventListener) {
window.addEventListener("unload", q.finish, false)
}
}
}
}
}
this._lastReferenceTime = (this._lastReferenceTime + h);
this.setNeedsDisplayIfNeeded()
}
});
Looks like it's a JS counter coupled with CSS.
The hearth of the whole script is this single image: http://images.apple.com/itunes/10-billion-app-countdown/images/filmstrip.png
Now everything should be obvious.
HTML placeholder for a single digit:
<div class="digit-placeholder"></div>
CSS that styles that placeholder:
.digit-placeholder {
/* Dimensions of a single "frame" */
width: 50px;
height: 75px;
background-image: url(...);
background-position: 0 0;
}
To display digit 7 you just have to move background (background-positon property) to the following coordinates: 0 -2800px (that's only an example). To display 8 move it to 0 -3400px.
To create an animation (change from 7 to 8) you just have to move background from -2800 to -3400 with a step of 60 in some period of time (let's say 0.5 second).
All you have to do is to clone that several times (10 times for one billion) and compute that period of time for each digit.
There's a file stored on the apple server which contains a count and a timestamp:
http://www.apple.com/autopush/us/itunes/includes/countdown.inc
That should give you a rough count.
Before I go to bed:
var number = '';
$('.digitImage').each(function(i) {
number += Math.abs($(this).position().top) / 618;
});
console.log(+number);
Now how long did that take? 3 minutes trying to figure out how do install a bookmarklet in chrome for injecting jQuery... 5 more minutes to get it working.

Categories