JS1k: The JavaScript code golfing competition
2010 - The Original
- Author:
- Stefan Trenkel
- Twitter:
- @
- GitHub:
- Facebook:
- Google+:
- +
- Reddit:
- /r/
- Pouet:
- Website:
- Compo:
- classic
- Demo link:
- https://js1k.com/2010-first/demo/568
- Shortlink:
- https://js1k.com/568
- Blog post:
- please update here!
- Bytes:
- 837
- Chars:
- 837
- Submission
d=document;b=d.body;b.style.margin=0;l=d.createElement("div");s=l.style;s.bottom="90px";s.width="60%";s.marginLeft="20%";s.borderBottom="1px solid #000";s.position="absolute";b.appendChild(l);t=d.createElement("div");s=t.style;s.fontSize="20px";s.textAlign="center";s.fontFamily="sans-serif";s.width="99%";s.position="absolute";s.bottom="40px";t.appendChild(d.createTextNode("Der springende Punkt"));b.appendChild(t);p=d.createElement("div");s=p.style;s.fontSize="120px";s.textAlign="center";s.position="relative";p.appendChild(d.createTextNode("."));l.appendChild(p);g=0.2;t=0;v();function m(){t++;if(t>=2*V/g){t=0;}s.top=(30-V*t+g*t*t/2)+"px";};function v(){V=Math.floor(Math.sqrt(2*g*(w()-160)));};function w(){if(window.innerHeight){return window.innerHeight;}else{return b.offsetHeight;}};window.setInterval(m,10);window.onresize=v;
- Description
- 'Der springende Punkt' is here.
- Base64 encoded
ZD1kb2N1bWVudDtiPWQuYm9keTtiLnN0eWxlLm1hcmdpbj0wO2w9ZC5jcmVhdGVFbGVtZW50KCJkaXYiKTtzPWwuc3R5bGU7cy5ib3R0b209IjkwcHgiO3Mud2lkdGg9IjYwJSI7cy5tYXJnaW5MZWZ0PSIyMCUiO3MuYm9yZGVyQm90dG9tPSIxcHggc29saWQgIzAwMCI7cy5wb3NpdGlvbj0iYWJzb2x1dGUiO2IuYXBwZW5kQ2hpbGQobCk7dD1kLmNyZWF0ZUVsZW1lbnQoImRpdiIpO3M9dC5zdHlsZTtzLmZvbnRTaXplPSIyMHB4IjtzLnRleHRBbGlnbj0iY2VudGVyIjtzLmZvbnRGYW1pbHk9InNhbnMtc2VyaWYiO3Mud2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