Created
February 20, 2013 15:26
-
-
Save finscn/4996310 to your computer and use it in GitHub Desktop.
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
function mazed(dom) { | |
if (!dom){ | |
dom=document.createElement("div"); | |
var css=[ | |
'font-family:courier;\ | |
font-size:20px;\ | |
letter-spacing:-5px;\ | |
line-height: 14px;\ | |
padding: 4px;\ | |
position:absolute;top:0px;left:0px;z-index:9999;\ | |
border:1px solid black;background:white;\ | |
-webkit-transform:matrix(2,0,0,1,180,50);' | |
] | |
dom.style.cssText=css.join(""); | |
document.body.appendChild(dom) | |
} | |
var m=[],line=""; | |
for(var i = 0; i < 1600; i++) { | |
if(i&&!(i % 40)) { | |
m.push(line) | |
line="" | |
} | |
line += Math.random() < 0.5 ? "/" : "\\"; | |
} | |
var html=m.join("<br>"); | |
dom.innerHTML=html; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment