- Author:
- Rob O'Dwyer
- Twitter:
- @
- GitHub:
- Facebook:
- Google+:
- +
- Reddit:
- /r/
- Pouet:
- Website:
- doteight.com
- Compo:
- classic
- Demo link:
- https://js1k.com/2010-first/demo/819
- Shortlink:
- https://js1k.com/819
- Blog post:
- please update here!
- Bytes:
- 1021
- Chars:
- 1021
- Submission
function d(c,b){var a=document.createElement("div");s0(a,"position:absolute;left:"+r(800)+"px;top:"+r(400)+"px;");s(a,"font-size:"+c+"px; opacity: 1.0;");s(a,"color:rgb("+r(255)+","+r(255)+","+r(255)+");");document.body.appendChild(a);a.innerHTML=u();var b=setInterval(function(){m(a)},b)}function s0(b,a){b.style.cssText=a}function s(b,a){b.style.cssText+=a}function m(a){o=parseFloat(a.style.opacity)-0.01;a.style.opacity=o;if(o<0.1){s0(a,"position:absolute;left:"+r(800)+"px;top:"+r(400)+"px;");s(a,"color:rgb("+r(255)+","+r(255)+","+r(255)+");");s(a,"font-size:"+(14+r(72))+"px; opacity:1.0;");a.innerHTML=u()}}function u(){num=Math.round(1114111*Math.random());var uni=eval('"\\u'+num.toString(16)+'"');return(uni.length>1)?u():uni}function r(a){return Math.round(a*Math.random())}var canvas=document.getElementById("c");var context=canvas.getContext("2d");document.body.style.cssText="background-color:black;color:white;";function l(a){if(a>0){try{d(14+r(72),10)}catch(b){}setTimeout(function(){l(a-1)},100)}}l(50);
- Description
- Displays random fading unicode characters in fancy colors.
Uses a hack based on the output generated by the browser to find valid UTF-8 sequences instead of doing it properly.
- Base64 encoded
ZnVuY3Rpb24gZChjLGIpe3ZhciBhPWRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIpO3MwKGEsInBvc2l0aW9uOmFic29sdXRlO2xlZnQ6IityKDgwMCkrInB4O3RvcDoiK3IoNDAwKSsicHg7Iik7cyhhLCJmb250LXNpemU6IitjKyJweDsgb3BhY2l0eTogMS4wOyIpO3MoYSwiY29sb3I6cmdiKCIrcigyNTUpKyIsIityKDI1NSkrIiwiK3IoMjU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uY3Rpb24oKXtsKGEtMSl9LDEwMCl9fWwoNTApOw==
- Original source
function d(size, interval) {
var txt = document.createElement('div');
s0(txt, 'position:absolute;left:' + r(800) + 'px;top:' + r(400) + 'px;');
s(txt, 'font-size:'+size+'px; opacity: 1.0;');
s(txt, 'color:rgb(' + r(255) + ',' + r(255) + ',' + r(255) + ');');
document.body.appendChild(txt);
txt.innerHTML = u();
var interval = setInterval(function() {
m(txt);
}, interval);
}
function s0(e, s) {
e.style.cssText = s;
}
function s(e, s) {
e.style.cssText += s;
}
function m(l) {
o = parseFloat(l.style.opacity) - 0.01;
l.style.opacity = o;
if(o < 0.1) {
s0(l, 'position:absolute;left:' + r(800) + 'px;top:' + r(400) + 'px;');
s(l, 'color:rgb(' + r(255) + ',' + r(255) + ',' + r(255) + ');');
s(l, 'font-size:'+(14+r(72))+'px; opacity:1.0;');
l.innerHTML = u();
}
}
function u() {
num = Math.round(0x10FFFF * Math.random());
var uni = eval('"\\u' + num.toString(16) + '"');
return (uni.length>1)? u() : uni;
}
function r(h) {
return Math.round(h * Math.random());
}
var canvas = document.getElementById("c");
var context = canvas.getContext('2d');
document.body.style.cssText="background-color:black;color:white;";
function l(num) {
if(num > 0) {
try {
d(14+r(72), 10);
} catch(e) { }
setTimeout(function() { l(num - 1) }, 100);
}
}
l(50);