Created
December 24, 2013 03:50
-
-
Save StoneCypher/8108585 to your computer and use it in GitHub Desktop.
AGAIN
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
var Data = { | |
starts : ["Experiential truth ", "The physical world ", "Non-judgment ", "Quantum physics "], | |
middles : ["nurtures an ", "projects onto ", "imparts reality to ", "constructs with "], | |
qualifiers : ["abundance of ", "the barrier of ", "self-righteous ", "potential "], | |
finishes : ["marvel.", "choices.", "creativity.", "actions."] | |
}; | |
function randFrom(X) { | |
return X[Math.floor(Math.random() * X.length)]; | |
} | |
function makeDC() { | |
return randFrom(Data.starts) + randFrom(Data.middles) + randFrom(Data.qualifiers) + randFrom(Data.finishes); | |
} | |
function go() { | |
document.getElementById('txt').innerHTML = '"' + makeDC() + '"'; | |
} | |
</script> | |
<style type="text/css"> | |
#picd { position: fixed; top: 2em; left: 2em; bottom: 2em; } | |
#pic { height: 100%; } | |
#txtd { position: fixed; top: 2em; right: 2em; text-align: right; width: 50%; } | |
#txt { font-size: 666%; font-family: sans-serif; } | |
#quot { font-size: 420%; font-family: sans-serif; font-style: italic; color: #999; margin-top: 1em; } | |
#baby { position: fixed; right: 2em; bottom: 2em; display: block; } | |
</style> | |
</head> | |
<body onload="go();"> | |
<div id="picd"><img id="pic" src="http://upload.wikimedia.org/wikipedia/commons/c/c0/Deepak_Chopra.jpg"></div> | |
<div id="txtd"><div id="txt"></div><div id="quot">-- Deepak Chopra</div></div> | |
<input id="baby" type="button" value="Again!" onclick="go();"> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment