wok rev 11614
nanochess: catch ?black arg (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Jan 21 23:16:13 2012 +0100 (2012-01-21) |
parents | cf79c6f40e99 |
children | 0686ab55b55a |
files | nanochess/receipt nanochess/stuff/index.html |
line diff
1.1 --- a/nanochess/receipt Sat Jan 21 16:40:16 2012 +0100 1.2 +++ b/nanochess/receipt Sat Jan 21 23:16:13 2012 +0100 1.3 @@ -18,7 +18,9 @@ 1.4 -e 's|for(a=|H=innerHeight/9;P=H*5/6;|' -e 's/^"<table/for(a=&/' \ 1.5 -e 's/f0f":"c0c")+"0f0/f0f":"606")+"0c0/' -e 's/e0e0f0/b0b080/' \ 1.6 -e 's/><option.*$/>";/' -e 's|^doc.*|for(p=18;++p<23;)a+="<option>\b"+p+";</option>";document.write(a);|' \ 1.7 - -e 's|<script>|<title>Toledo chess</title>&|' \ 1.8 + -e 's|<scrip.*|<title>Toledo chess</title>&\nvar go=/[\\?]b.*/i.test(document.URL)?8:0|' \ 1.9 + -e 's|function Y|function Z(){if(y!=go)setTimeout("X(0,0,0,21,u,2),X(0,0,0,21,u,1)",250);}\n&|' \ 1.10 + -e 's|if(y)set.*|Z();}}Z()|' \ 1.11 index.html 1.12 } 1.13
2.1 --- a/nanochess/stuff/index.html Sat Jan 21 16:40:16 2012 +0100 2.2 +++ b/nanochess/stuff/index.html Sat Jan 21 23:16:13 2012 +0100 2.3 @@ -1,5 +1,4 @@ 2.4 <script>//(c)2010 Oscar Toledo G. 2.5 -var go=new RegExp("[\?].*");go=go.exec(document.URL);go=(go&&go=="?black")?8:0 2.6 var B,i,y,u,b,I=[],G=120,x=10,z=15,M=1e4,l=[5,3,4,6,2,4,3,5,1,1,1,1,1,1,1,1,9,9 2.7 ,9,9,9,9,9,9,13,11,12,14,10,12,11,13,0,99,0,306,297,495,846,-1,0,1,2,2,1,0,-1,- 2.8 1,1,-10,10,-11,-9,9,11,10,20,-9,-11,-10,-20,-21,-19,-12,-8,8,12,19,21];function 2.9 @@ -27,8 +26,7 @@ 2.10 function W(){B=b;for(p=21;p<99;++p)if(q=document.getElementById("o"+p)){q. 2.11 innerHTML="\xa0\u265f\u265a\u265e\u265d\u265c\u265b \u2659\u2654\u2658\u2657\u2656\u2655".charAt(I[p]&z); 2.12 q.style.borderColor=p==B?"red":"#dde";}}W(); 2.13 -function Z(){if(y!=go)setTimeout("X(0,0,0,21,u,2),X(0,0,0,21,u,1)",250);} 2.14 function Y(s){i=(I[s]^y)&z;if(i>8){b=s;W();}else if(B&&i<9){b=s;i=I[B]&z;if((i& 2.15 7)==1&(b<29|b>90))i=14-document.getElementById("t").selectedIndex^y;X(0,0,0,21, 2.16 -u,1);Z();}}Z() 2.17 +u,1);if(y)setTimeout("X(0,0,0,21,u,2/*ply*/),X(0,0,0,21,u,1)",250);}} 2.18 </script>