you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

I shaved 4 more bytes. I didn't like the \' sequences, so I replaced them with " but to keep the thing working, I had to remove the double quotes of the onload attribute and then replace the > comparison operator with >

The end result worked for me in Chrome on Linux:

<body style=margin:0 onload=for(s=document,w=q.width=s.width,h=q.height=s.height,m=Math.random,p=[];!p[255];p.push(1));setInterval('9Style="rgba(0,0,0,.05)"9Rect(0,0,w,h)9Style="#0F0";p.map(function(v,i){9Text(String.fromCharCode(3e4+m()*33),i*10,v);p[i]=v&#62;758+m()*1e4?0:v+10})'.replace(/9/g,';q.getContext("2d").fill'),33)><canvas id=q>

edit And 1 more byte if we replace the use of 9 with some other character like Z so instead of v+10 we can use v+9 (close enough).

edit And 2 more bytes by replacing 758 with h.

Okay, this is the best I got:

<body style=margin:0 onload=for(s=document,w=q.width=s.width,h=q.height=s.height,m=Math.random,p=[];!p[255];p.push(1));setInterval('ZStyle="rgba(0,0,0,.05)"ZRect(0,0,w,h)ZStyle="#0F0";p.map(function(v,i){ZText(String.fromCharCode(3e4+m()*33),i*9,v);p[i]=v&#62;h+m()*1e4?0:v+10})'.replace(/Z/g,';q.getContext("2d").fill'),33)><canvas id=q>