wok-6.x rev 12094
nanochess: add swap button
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Mar 10 22:40:26 2012 +0100 (2012-03-10) |
parents | ed85379cebcb |
children | 8fd412038da2 |
files | nanochess/receipt |
line diff
1.1 --- a/nanochess/receipt Sat Mar 10 18:50:53 2012 +0100 1.2 +++ b/nanochess/receipt Sat Mar 10 22:40:26 2012 +0100 1.3 @@ -19,14 +19,15 @@ 1.4 mkdir -p $src 2> /dev/null 1.5 cp $stuff/index.html $src 1.6 cd $src 1.7 - sed -i -e 's/<select/\♟ \→ &/' \ 1.8 + sed -i -e 's/<select/<input type=\\"button\\" value=\\"\♚ \⇔ \♔\\" onclick=\\"yy^=8;Z()\\">&/' \ 1.9 + -e "s/ style='font-size:20px'//" \ 1.10 -e 's/50px/"+P+"px/g' -e 's/=60/="+H+"/g' \ 1.11 -e 's|for(a=|H=innerHeight/9;P=H*5/6;|' -e 's/^"<table/for(a=&/' \ 1.12 -e "s/c0c\":\"f0f\")+\"0f0/$white\":\"$black\")+\"/" \ 1.13 -e "s/#dde/$gray/" -e "s/red/$red/" -e 's/bgcolor=#/bgcolor=/' \ 1.14 - -e 's/><option.*$/>";/' -e 's|^doc.*|for(p=18;++p<23;)a+="<option>\b"+p+";</option>";document.write(a);|' \ 1.15 + -e 's/><option.*$/>";/' -e 's|^doc.*|yy=0;for(p=18;++p<23;)a+="<option>\♟ \→ \b"+p+";</option>";document.write(a);|' \ 1.16 -e 's|<script>|<title>Toledo chess</title>&|' \ 1.17 - -e 's|function Y|function Z(){if(y!=/\\?b/i.test(document.URL)?8:0)setTimeout("X(0,0,0,21,u,2),X(0,0,0,21,u,1)",250);}\n&|' \ 1.18 + -e 's|function Y|function Z(){if(y!=yy^/\\?b/i.test(document.URL)?8:0)setTimeout("X(0,0,0,21,u,2),X(0,0,0,21,u,1)",250);}\n&|' \ 1.19 -e 's|if(y)set.*|Z();}}Z()|' \ 1.20 index.html 1.21 }