Last active
December 27, 2015 11:19
-
-
Save moroya/7318127 to your computer and use it in GitHub Desktop.
「オケオケオッケー」の中からランダムに文字列を返して、130回以内に「オケオケオッケー」に一致する文字列が出たら[それまでの試行結果]+"\n"+n+"回目の試行で成功" 出なかったら[それまでの試行結果]+"\nFailed" とツイートするクソコード
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
javascript:c='オケオケオッケー';l=130;r='';p=c.split('');for(i=0;i<l;i++){r+=p[~~(Math.random()*p.length)];if(r.substr(p.length*-1)==c)break;}l==i?r+='\nFailed':r+='\n'+(i+1)+'回目の試行で成功';location.href='https://twitter.com/intent/tweet?text='+encodeURIComponent(r); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment