-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
1 lines (1 loc) · 1.63 KB
/
index.html
1
<!doctype html><style>body{border-radius:10px;border:2px solid #555;border-right:4px solid #555;border-bottom:4px solid #555;margin:20px auto;width:810px;height:520px;padding:10px}#n1{width:130px;float:left;margin:3px 0}#n1 button{width:130px;margin:4px 0 0;border:2px solid #555}button:active,button:focus{background:#555;color:#fff}#i1{width:650px;height:500px;margin:10px 0 0 140px;border:2px solid #555;background:#777;position:relative}iframe{background:#fff;display:block}pre{background:#fff;margin:20px;padding:10px;max-height:360px;overflow:auto}a{color:#555}#c{color:#888}</style><nav id=n1></nav><div id=i1></div><br><br><center id=c>Codegolf Team - <a href=//goo.gl/e6OCvS>more</a> - <a href=//goo.gl/M3XXg3>ama</a> - <a href=# onclick="location='//www.twitter.com/share?url='+location">share</a><script>for(i in j="MMXLVIII0flASCII bird0Four0Impossible Road02P games0Chip80Floppy dragon0Flappy Braille0PopTiles0Simon0Mini Sweeper0Ping0Run0Snake0Snake Lite0Color0Game of Life0Game of ASCII0Game of Braille".split(0))n1.innerHTML+="<button onclick=\"p("+i+",'"+j[i]+"')\">"+j[i];p=(n,o)=>{location.hash="";if(n==2)q(n);else{x=new XMLHttpRequest;x.open("GET",n.toString(36)+(n==7?".js":".htm"),!1);x.send(null);z=x.responseText.replace(/.{71}/g,"$&\n").replace(/</g,"<");i1.innerHTML="<center><br><button onclick=q("+n+")><h2>PLAY "+o;i1.innerHTML+="<pre>"+z;}};q=(n)=>{h=[26,18,16,50,48,28,50,4,16,50,28,22,16,20,28,48,12,48,46];i1.innerHTML="<iframe id=P src="+(n.toString(36))+".htm frameborder=no style='width:"+[25,20,58,65,50,36,65,8,13,65,30,25,50,34,28,40,12,50,46][n]+"0px;height:"+h[n]+"0px;margin:"+((50-h[n])/2)+"0px auto'>";P.focus()}</script>