wok-current rev 12100

nanochess: set backgound color
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Mar 11 08:44:41 2012 +0100 (2012-03-11)
parents 508c331860fd
children cd2f1773baed
files nanochess/receipt
line diff
     1.1 --- a/nanochess/receipt	Sun Mar 11 02:56:40 2012 +0100
     1.2 +++ b/nanochess/receipt	Sun Mar 11 08:44:41 2012 +0100
     1.3 @@ -11,6 +11,7 @@
     1.4  compile_rules()
     1.5  {
     1.6  	# define colors
     1.7 +	background="black"	# was white
     1.8  	white="#f0f0b0"		# was #f0f0f0
     1.9  	black="#f05030"		# was #c0c0f0
    1.10  	gray="#843"		# was #dde
    1.11 @@ -20,14 +21,14 @@
    1.12  	cp $stuff/index.html $src
    1.13  	cd $src
    1.14  	sed -i -e 's/<select/<input type=\\"button\\" value=\\"\&#9818; \&hArr; \&#9812;\\" onclick=\\"yy^=8;Z()\\">&/' \
    1.15 -	  -e "s/ style='font-size:20px'//" \
    1.16 +	  -e 's/><option.*$/>";/' -e "s/ style='font-size:20px'//" \
    1.17  	  -e 's/50px/"+P+"px/g' -e 's/=60/="+H+"/g' \
    1.18  	  -e 's|for(a=|H=innerHeight/9;P=H*5/6;|' -e 's/^"<table/for(a=&/' \
    1.19  	  -e "s/c0c\":\"f0f\")+\"0f0/$white\":\"$black\")+\"/" \
    1.20  	  -e "s/#dde/$gray/" -e "s/red/$red/" -e 's/bgcolor=#/bgcolor=/' \
    1.21 -	  -e 's/><option.*$/>";/' -e 's|^doc.*|yy=0;for(p=18;++p<23;)a+="<option>\&#9823; \&rarr; \&#98"+p+";</option>";document.write(a);|' \
    1.22 -	  -e 's|<script>|<title>Toledo chess</title>&|' \
    1.23 -	  -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.24 +	  -e 's|^doc.*|yy=/\\?b/i.test(document.URL)?8:0;for(p=18;++p<23;)a+="<option>\&#9823; \&rarr; \&#98"+p+";</option>";document.write(a);|' \
    1.25 +	  -e "s|<script>|<style>body {background: $background;}</style><title>Toledo chess</title>&|" \
    1.26 +	  -e 's|function Y|function Z(){if(y!=yy)setTimeout("X(0,0,0,21,u,2),X(0,0,0,21,u,1)",250);}\n&|' \
    1.27  	  -e 's|if(y)set.*|Z();}}Z()|' \
    1.28  		index.html
    1.29  }