Last active
October 12, 2018 19:12
-
-
Save pschfr/81af7b817b38be47ebd966ab94aa01eb to your computer and use it in GitHub Desktop.
One line data:text/html calculator from https://twitter.com/MaximeEuziere/status/1050823405728088065
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
<body onload='for(s of"C/=.0 *321 -654 +987 ")i.outerHTML+=s<"!"?"<p>":`<button onclick=F("${s}")>`+s;F=b=>i.value=z=b>"B"?(c=d=o="",a=r=p=0):1+b-0?c+=b-.1?b:d?"":d=b:(q=b<"=",p?r=c:a=c||a,r=q?p&&r:r||a,a=o&&r?z=eval(a+o+s+r):a,o=q?b:o,p=q,d=c="",q?z:a);F`C`'><input id=i> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From https://twitter.com/MaximeEuziere/status/1050823405728088065. Copy this, go to your URL bar and type `data:text/html,' and then paste and hit enter. Be amazed!