Created
January 6, 2014 21:26
-
-
Save pvdz/8290105 to your computer and use it in GitHub Desktop.
By popular demand. Working off the 295 version:
https://github.com/aemkei/aemkei.github.io/blob/3aec52907a6ed19d6069d168274c02b2151160e6/sheet/index.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original: | |
<table id=t><script>with(t)A=function(){for(a=h='';9>a;a++)for(h+="<tr>",c=0;d=" ABCDE"[c];)h+="<td>"+(c++?a?t[d+=a]=t[d]?eval("top[d][V='value']="+(l[d]||"''").replace(/^=/,'')):"<input id=D onfocus=D[V]=[l.D] onblur=A(l.D=D[V])>".replace(/D/g,d):d:a)},A(A(l=localStorage),innerHTML=h)</script> | |
Innermost for-body could be in loop-part (potential 1b gain but nothing to put there) (+1) | |
<table id=t><script>with(t)A=function(){for(a=h='';9>a;a++)for(h+="<tr>",c=0;d=" ABCDE"[c];h+="<td>"+(c++?a?t[d+=a]=t[d]?eval("top[d][V='value']="+(l[d]||"''").replace(/^=/,'')):"<input id=D onfocus=D[V]=[l.D] onblur=A(l.D=D[V])>".replace(/D/g,d):d:a));},A(A(l=localStorage),innerHTML=h)</script> | |
Cache the empty string (0) | |
<table id=t><script>with(t)A=function(){for(x=a=h='';9>a;a++)for(h+="<tr>",c=0;d=" ABCDE"[c];)h+="<td>"+(c++?a?t[d+=a]=t[d]?eval("top[d][V='value']="+(l[d]||"x").replace(/^=/,x)):"<input id=D onfocus=D[V]=[l.D] onblur=A(l.D=D[V])>".replace(/D/g,d):d:a)},A(A(l=localStorage),innerHTML=h)</script> | |
Make A a decl (+1) | |
<table id=t><script>function A(){with(t)for(a=h='';9>a;a++)for(h+="<tr>",c=0;d=" ABCDE"[c];)h+="<td>"+(c++?a?t[d+=a]=t[d]?eval("top[d][V='value']="+(l[d]||"''").replace(/^=/,'')):"<input id=D onfocus=D[V]=[l.D] onblur=A(l.D=D[V])>".replace(/D/g,d):d:a)}A(A(l=localStorage),t.innerHTML=h)</script> | |
Attempt to eliminate inner c var, failed, -4 and too many cells | |
<table id=t><script>with(t)A=function(){for(z=a=h='';9>a;z=a++)for(h+="<tr>";d=" ABCDE"[++z-a];)h+="<td>"+(z>a?a?t[d+=a]=t[d]?eval("top[d][V='value']="+(l[d]||"''").replace(/^=/,'')):"<input id=D onfocus=D[V]=[l.D] onblur=A(l.D=D[V])>".replace(/D/g,d):d:a)},A(A(l=localStorage),innerHTML=h)</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment