-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathean1k.js
1 lines (1 loc) · 1018 Bytes
/
ean1k.js
1
d=document;i=window.parent.location.href.split("?")[1];l=0;if(i){i=i.split("&");for(j=0;j<i.length;j++){k=i[j].split("=");if(k[0]=="ean")l=k[1];}}q=eval;T="q(u+z.join(v+u)+v)";a=[114,102,108,66,92,78,80,68,72,116];b=[0,11,13,14,19,25,28,21,22,26];x="for(j=0;j<7;j++){k=n[g](i);o=";w="for(;i<";y="6-j;l=(a[k]>>o)&1;if(";u="c.fillRect(";t="l)z.push(i*7+j+";e=d.body;c=e.children[0];if(l)p={value:l};else{f="createElement";g="insertBefore";p=d[f]("input");e[g](p,c);e[g](d[f]("br"),c);p.focus();p.onkeyup=r}c=c.getContext("2d");c.font="24px Arial";g="charAt";r({target:p});function r(e){c.clearRect(0,0,240,200);s="substring";S=e.target.value;L=S.length;if(L>13)S=e.target.value=S[s](L-13,L);if(!S.match(/^\d+$/)){S="";L=0}n="";for(i=0;i<13-L;i++)n+=0;n+=S;z=[2,4,48,50,94,96];v="*2+18,10,2,130);";q(T);i=1;z=[];v=v.replace(3,1);f=n[g](0);h="fillText";c[h](f,6,140);c[h](n[s](1,7),32,140);c[h](n[s](7,13),124,140);h=b[f];q([w,"7;i++){m=(h>>6-i)&1;",x,"m?j:",y,"!m^",t,-2,")}}",w,"13;i++){",x,y,t,3,")}}"].join(""));q(T)}