With a few bytes (almost 1800 of them) of JavaScript, I managed to create a cool ASCII art
Here's the code:
(The big strings at the beginning are like 90% of the program, they hold all of the sprite data.)
You can also see a live version of the code here. (My webpage has a style tag getting rid of the margin of the elements I am injecting.
(there was an optimization I made that threw the "code walrus" out of sync with the "CodeWalrus")
Who else thinks this belongs on the CW 404 page? I made an embeddable version (literally changed 2 things). You can embed it in your site, and it even comes with a link to CW, so you are helping CW and getting a cool animated , all for just one line of code (technically). What a deal!
Here's the code:
Code Select
var f=0,a=["@L@L@L@L@L@L@L@LUQsL@K-B@L@L@L@L@LEgsL@ALAssAAs-sL@L@L@LC1ELCwoEKQsLDigELCgB@L@L@LCxILCwAsL-LAAs@sAAsL@L@LCwtRCwoJWgMhHgAABCkLDigAAQsL@L@S@AACFNTQAWIQAs@AFgAL@L@LUQsKAAMlTUYHTUkeAQ4oBkEyAQsL@LEgsANyEATU0ATU0hACwAIRZCAAsL@LC1EKAyEgFAACF-CVoDISAWGTIB@LCxIAABYAFiEhIRY-AhIRYWFjcA@LCwtQAQo-MgFAMhISEhIBYWFhYZMgEL@SACxjAAs-AhFhYWFhYWFhYWNwAL@LUAQsKAQpE1oDIBYWFhYWFhYWGTIB@LEgAsLAAsCywAIRYWFhYWFhYWFiEA@LC1AEMVoEKQ4oAyEhISAWFhYWFhceAQsLCxIACwAAYwtjACEhACEAISEWFhZCNwALCwtQBjwBCgkKAyEeAhYXHgMhIBYWGjwB@SAEI-BCACEAQkIWISEhISEhIQA3AAsLUAY8BTIGPAAFOD4WFyEeAyEhIBkyAAELEgAANyEAQgAAQhYWISEAFhYhACFCAAsLC1AABTUeAAIZNBYXIBQAAhYUAAMgGTIBCxIAFiEACwAANyEh-ACw--ISEWAAtQ-B@K-AAQsL@L@LCg-Qs=","@L@-AL@L@L@L@L@LUQsLCwoELCwoAQoAAQsL@L@L@LEgsLCwAsLAsLLAAsLAAL@L@L@LC1ELCgQsKAABCgELCw4oAQsL@L@LCxILCwALACEh-ALAsLL-@L@LCwtRCwoAAyVNRgIXHgQpDigFMgEL@L@S@AACFNTQBNTSEALCwANzcA@L@LUQoFNR4HTUYHTUkeCVoDIBo8AQsL@LEgsAISEW-WAE0AYwAhIRYWNwAL@LC1-hQCFyEhIBQ-MhIBYWGTIB@LCxIAQg-CEWACEhISEhFhYWFjcA@LCwtQBCkKBjw-MgFhYWFhYWFhYZMgEL@SA@ACwLCwAhFhYWFhYWFhYWNwAL@LUAQsKAQpDigDIBYWFhYWFhYWFx4B@LEgAsYwAsCywAIRYWFhYWFhYWFiEA@LC1ABCgAJWxNaAyEhISAWFhYWFhceAQsLCxIAQg-AsAISEhACEhISEWFhZCNwALCwtQBjwBCgY8AyEeAyAWFAMhIBYWGjwAAQsSAEI-BCACEhISEWQjcAISEhIRY3-LUQoAAhQGPAMhISEgFhpBMgMhHgMjMgELEgsAADchABYWFgAhIRYWQgAhIQAhFjcAC1EKBTQXIBQ-IUAhcgFhkyAhYUAyEgFAgLABYh-L@-AAISE3-ACw-AtRCg-QsL@L@LCg-AEL@L@="],w=f=>(atob(a[f].replace(/-/g,'AAA').replace(/@/g,'Cws')).split('').map(x=>x.charCodeAt(0).toString(10).padStart(2,0)).join('')+'1').split(.map(x=>"<tt>"+x.split('').map(x=>"M +o'/:y\n.".charAt(x)).join('').replace(/ /g,' ')+"</tt>").join('[br /]');window.onload=x=>{d=document.body,e="innerHTML";setInterval(x=>{d[e]='';d[e]=w(f=+(f==0))},300)}
(The big strings at the beginning are like 90% of the program, they hold all of the sprite data.)
You can also see a live version of the code here. (My webpage has a style tag getting rid of the margin of the elements I am injecting.
(there was an optimization I made that threw the "code walrus" out of sync with the "CodeWalrus")
Who else thinks this belongs on the CW 404 page? I made an embeddable version (literally changed 2 things). You can embed it in your site, and it even comes with a link to CW, so you are helping CW and getting a cool animated , all for just one line of code (technically). What a deal!
Code Select
<div id="w"></div><script>var f=0,a=["@L@L@L@L@L@L@L@LUQsL@K-B@L@L@L@L@LEgsL@ALAssAAs-sL@L@L@LC1ELCw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ISEWFhZCNwALCwtQBjwBCgY8AyEeAyAWFAMhIBYWGjwAAQsSAEI-BCACEhISEWQjcAISEhIRY3-LUQoAAhQGPAMhISEgFhpBMgMhHgMjMgELEgsAADchABYWFgAhIRYWQgAhIQAhFjcAC1EKBTQXIBQ-IUAhcgFhkyAhYUAyEgFAgLABYh-L@-AAISE3-ACw-AtRCg-QsL@L@LCg-AEL@L@="],w=f=>(atob(a[f].replace(/-/g,'AAA').replace(/@/g,'Cws')).split('').map(x=>x.charCodeAt(0).toString(10).padStart(2,0)).join('')+'1').split(8).map(x=>"<tt>"+x.split('').map(x=>"M +o'/:y\n.".charAt(x)).join('').replace(/ /g,' ')+"</tt>").join('<br>');window.onload=x=>{d=document.getElementById('w'),e="innerHTML";setInterval(x=>{d[e]=w(f=+(f==0))+"<br><br>Animated ASCII art walrus created by _iPhoenix_ for <a href='https://codewalr.us'>CodeWalrus</a>."},300);}//please don't remove my notice.</script>