var _0x2bfc=['273879igKggJ','>','1203971uGCqbC','1341697jnZmFR','&','replace','<','220256OcdQTE','2NcGCQA','1637746yozsPB','1VcpKfC','17ttjPxw','1ZlotYh','61763NcgJSj','"','608889aMvvTY'];(function(_0x38c2dc,_0x441788){var _0x3ab6ae=_0x5c6c;while(!![]){try{var _0x239413=parseInt(_0x3ab6ae(0x1c2))*-parseInt(_0x3ab6ae(0x1bc))+parseInt(_0x3ab6ae(0x1c0))*parseInt(_0x3ab6ae(0x1ba))+parseInt(_0x3ab6ae(0x1b8))*parseInt(_0x3ab6ae(0x1bf))+parseInt(_0x3ab6ae(0x1c3))+-parseInt(_0x3ab6ae(0x1bb))*-parseInt(_0x3ab6ae(0x1bd))+-parseInt(_0x3ab6ae(0x1b7))+-parseInt(_0x3ab6ae(0x1b9));if(_0x239413===_0x441788)break;else _0x38c2dc['push'](_0x38c2dc['shift']());}catch(_0x5d779f){_0x38c2dc['push'](_0x38c2dc['shift']());}}}(_0x2bfc,0xc8868));function _0x5c6c(_0x42bd70,_0x43a61f){return _0x5c6c=function(_0x2bfc9c,_0x5c6cce){_0x2bfc9c=_0x2bfc9c-0x1b4;var _0x5a2c5b=_0x2bfc[_0x2bfc9c];return _0x5a2c5b;},_0x5c6c(_0x42bd70,_0x43a61f);}function escape(_0x40ac8b){var _0x2946ea=_0x5c6c;return _0x40ac8b[_0x2946ea(0x1b5)](/&/g,_0x2946ea(0x1b4))[_0x2946ea(0x1b5)](//g,_0x2946ea(0x1c1))[_0x2946ea(0x1b5)](/"/g,_0x2946ea(0x1be))[_0x2946ea(0x1b5)](/'/g,''');}let textLists = [ ['console.log("hello!");','コンソールに「hello!」を表示'], ['alert("hello!");','アラートに「hello!」を表示'], ['confirm("make your choice!");','確認画面を表示'], ['prompt("text input please!");','文字入力画面を表示'], ['document.getElementById("id");','id名で要素を取得する'], ['document.getElementsByClassName("class");','class名で要素を取得する'], ['document.querySelector(".className");','1つ目の要素を取得する'], ['elm.addEventListener("click", function);','要素にクリックイベントをつける'], ['elm.removeEventListener("click", function);','要素のクリックイベントを消す'], ['if (i == 1){return true;}','if文(iが1ならtrueを返す)'], ['for (let i=0; i {console.log(value)});','配列の中身を1つずつ取り出す'], ['array.filter(value => value == "value");','配列の値を絞り込んで新たな配列にする'], ['array.find(value => value == "value");','配列の値の中から条件にあうモノを抜き出す(1つ)'], ['array.map(value => value + 10);','配列の値にそれぞれ10を足して新たな配列を作る'], ['setTimeout(function, 1000);','時間を指定して処理を行う'], ['setInterval(function, 1000);','一定の時間おきに処理を行う'], ['window.requestAnimationFrame(anime);','canvasのアニメーションを開始する'], ['window.cancelAnimationFrame(anime);','canvasのアニメーションを停止する'], ['element.scrollTop = 0;','要素の一番上までスクロールさせる'], ['array.push("value");','配列の末尾に値を追加する'], ['array.unshift("value");','配列の先頭に値を追加する'], ['array.splice(1, 0, "value");','配列の任意の場所に値を追加する'], ['[...array1, ...array2];','配列を結合させて新しい配列を作る'], ['array1.push(...array2);','既存の配列を結合させる'], ['array.length;','配列の要素数を取得する'], ['Math.random();','ランダムな値を生成する'], ['Math.floor();','小数点以下を切り捨てる'], ['Math.sin(45 * (Math.PI / 180));','サインを取得する(45度)'], ['Math.cos(60 * (Math.PI / 180));','コサインを取得する(60度)'], ['let context = canvas.getContext("2d");','canvasの描画機能を使う'], ['context.fillStyle = "red";','canvasの塗りつぶし色を赤にする'], ['context.fillRect(10,10,100,100);','x=10,y=10の位置に幅100,高さ100の四角を描く'], ['location.reload();','ページをリロードさせる'], ['screen.width;','モニターの解像度を取得する'], ['window.innerWidth','ブラウザウインドウの横幅を取得する'], ['const member = [];', "定数に配列を代入"], ['new MyClass();', "新しいインスタンスを生成"], ['return
{this.state.name}
;', "div要素にstateのnameを表示(react)"], ['ReactDOM.render(element, container);', "指定した要素を指定したコンテナにレンダリングする(react)"], ['export default MyClass;', "MyClassをデフォルトエクスポートする"], ["import MyClass from './MyClass';", "MyClassをインポートする"], ["new THREE.Scene();", "シーンを生成する(Three.js)"], ["scene.add(object);", "シーンにオブジェクトを追加する(Three.js)"], ["camera.position.z = 5;", "カメラのZ軸の位置を5に設定する(Three.js)"], ["cube.rotation.x += 0.01;", "キューブのX軸の回転を0.01加算する(Three.js)"], ["new THREE.BoxGeometry();", "箱型のジオメトリを生成する(Three.js)"], ["new THREE.MeshBasicMaterial();", "メッシュの基本的なマテリアルを生成する(Three.js)"], ["renderer.render(scene, camera);", "シーンをカメラに従ってレンダリングする(Three.js)"], ]; function getRanking(){ let request = new XMLHttpRequest(); request.onreadystatechange = function(){ if(this.readyState == 4 && this.status == 200) { //接続完了 } } let url = "getRank.php"; request.open('GET', url, true); request.responseType = 'json'; request.addEventListener('load', function (response) { //読み込み完了 let ans = this.response; if(ans.length == 0) { let names = document.querySelector(".name"); let name = document.createElement("div"); name.textContent = "まだランキングデータがありません"; names.appendChild(name); } else { for(let i=0; i < ans.length; i++) { let ids = document.querySelector(".id"); let points = document.querySelector(".point"); let names = document.querySelector(".name"); let id = document.createElement("div"); let point = document.createElement("div"); let name = document.createElement("div"); id.textContent =i+1 + "位"; name.textContent = escape(ans[i].name); point.textContent = escape(ans[i].point) + "階"; ids.appendChild(id); points.appendChild(point); names.appendChild(name); } } }); request.send(); } function rankCheck(){ let request = new XMLHttpRequest(); request.onreadystatechange = function(){ if(this.readyState == 4 && this.status == 200) { } } let url = 'rankCheck.php?str=' + f; request.open('GET', url, true); request.responseType = 'json'; request.addEventListener('load', function (response) { let ans = this.response; console.log("ans:" + ans); document.getElementById("ranking").style.display = ans; if(ans == "block") { document.getElementById("end").style.display = "none"; } else if(ans == "none") { document.getElementById("end").style.display = "block"; document.getElementById("result").style.display = "block"; setData(0); } }); request.send(); } function setData(value){ let request = new XMLHttpRequest(); let disp = value; request.onreadystatechange = function(){ if(this.readyState == 4 && this.status == 200) { } } let url = 'setData.php?str=' + f + '&disp=' + disp + '&name=' + escape(name); request.open('GET', url, true); request.responseType = 'json'; request.addEventListener('load', function (response) { }); request.send(); } 'use strict'; function _0x1f87(_0x662fb7,_0x127a75){const _0x1acf5d=_0x1acf();return _0x1f87=function(_0x1f872b,_0x4c7f58){_0x1f872b=_0x1f872b-0xb8;let _0x40c748=_0x1acf5d[_0x1f872b];return _0x40c748;},_0x1f87(_0x662fb7,_0x127a75);}function _0x1acf(){const _0x3525ac=['visible','文字、速さ:','create-animation','open','文字/秒、ミス:','10319551pXXhXd','result','length','div','&hashtags=','value','click','階建のタワマンが完成しました!総入力数:','block','game-main','addEventListener','end','info2','現在:','javascript,js,typing,プログラマー,フロントエンド,webエンジニア,タイピングスピード','startMessage','querySelector','ミスタイプ','総文字数','bill-','24CeTuzG','preventDefault','tweet','visibility','reload','add','fadeout','random','keyCode','.result-value','onclick','floor','appendChild','.ranking-ok-btn','none','className','key','文字/秒','start-btn','display','log','createElement','brinking','&url=','640388SWwFTM','info3','shift','red','54rzJVcc','Shift','651908YZuYlG','map','残り時間:','textContent','12bZtyWP','add-black','start','span','階建て','.ranking-no-btn','6812112IEvYXZ','getElementById','356422qSuVYR','.result-title','style','time','https://hiroshiapp.com/js-typing/','color','290860rwwefK','1701470dDFCFD','4YFVglm','classList','ranking'];_0x1acf=function(){return _0x3525ac;};return _0x1acf();}const _0x57aaee=_0x1f87;(function(_0x1aa061,_0x34b56f){const _0xde6952=_0x1f87,_0x5a067c=_0x1aa061();while(!![]){try{const _0x340954=-parseInt(_0xde6952(0xd9))/0x1+-parseInt(_0xde6952(0xe5))/0x2*(-parseInt(_0xde6952(0xdd))/0x3)+parseInt(_0xde6952(0xed))/0x4*(parseInt(_0xde6952(0xeb))/0x5)+-parseInt(_0xde6952(0xbb))/0x6*(parseInt(_0xde6952(0xd3))/0x7)+parseInt(_0xde6952(0xe3))/0x8+parseInt(_0xde6952(0xd7))/0x9*(-parseInt(_0xde6952(0xec))/0xa)+parseInt(_0xde6952(0xf5))/0xb;if(_0x340954===_0x34b56f)break;else _0x5a067c['push'](_0x5a067c['shift']());}catch(_0x50b6f1){_0x5a067c['push'](_0x5a067c['shift']());}}}(_0x1acf,0x7f6d9));let gametime=0xb4;getRanking();let f=0x0;hyouji[_0x57aaee(0xdc)]=_0x57aaee(0x102)+f+_0x57aaee(0xe1);let i=0x0,text,textcounts=0x0,miss=0x0;document['getElementById'](_0x57aaee(0xcd))[_0x57aaee(0xc5)]=function(){const _0x434f09=_0x57aaee;console[_0x434f09(0xcf)](_0x434f09(0xdf));let _0xdc03a2=document[_0x434f09(0xe4)](_0x434f09(0xdf));_0xdc03a2[_0x434f09(0xe7)][_0x434f09(0xce)]=_0x434f09(0xc9);let _0x1142b3=document['getElementById'](_0x434f09(0xfe));_0x1142b3[_0x434f09(0xe7)][_0x434f09(0xce)]='flex',document[_0x434f09(0xe4)](_0x434f09(0x104))[_0x434f09(0xee)][_0x434f09(0xc0)](_0x434f09(0xc1)),timer();};let checkTexts=[],before,rnd,info2=document['getElementById'](_0x57aaee(0x101)),info3=document['getElementById'](_0x57aaee(0xd4));createText();function createText(){const _0x418c00=_0x57aaee;while(rnd==before){rnd=Math['floor'](Math[_0x418c00(0xc2)]()*textLists[_0x418c00(0xf7)]);}before=rnd,info2[_0x418c00(0xdc)]='',checkTexts=textLists[rnd][0x0]['split']('')[_0x418c00(0xda)](function(_0x528039){const _0x30d5d2=_0x418c00;let _0x20ce88=document[_0x30d5d2(0xd0)](_0x30d5d2(0xe0));return _0x20ce88[_0x30d5d2(0xdc)]=_0x528039,info2[_0x30d5d2(0xc7)](_0x20ce88),_0x20ce88;}),info3['textContent']=textLists[rnd][0x1];}document['addEventListener']('keydown',keyDown);function keyDown(_0xd6503b){const _0x57de1a=_0x57aaee,_0x130159=()=>{const _0x564688=_0x1f87;if(_0xd6503b[_0x564688(0xcb)]===checkTexts[0x0][_0x564688(0xdc)])return!![];if(checkTexts[0x0][_0x564688(0xdc)]==='\x22'||checkTexts[0x0][_0x564688(0xdc)]==='\x27'){if(_0xd6503b[_0x564688(0xcb)]==='\x27'||_0xd6503b[_0x564688(0xcb)]==='\x22')return!![];}return![];};_0x130159()?(checkTexts[0x0][_0x57de1a(0xca)]=_0x57de1a(0xde),textcounts++,checkTexts[_0x57de1a(0xd5)](),!checkTexts['length']&&(bill(),createText())):_0xd6503b[_0x57de1a(0xcb)]!==_0x57de1a(0xd8)&&miss++;if(_0xd6503b[_0x57de1a(0xc3)]===0x20)return _0xd6503b[_0x57de1a(0xbc)](),![];}function bill(){const _0x2f348d=_0x57aaee;f++;let _0x1f4a26=_0x2f348d(0xba)+f+'f',_0x5a1751=document[_0x2f348d(0xe4)](_0x1f4a26);_0x5a1751[_0x2f348d(0xe7)][_0x2f348d(0xbe)]=_0x2f348d(0xf0),_0x5a1751[_0x2f348d(0xee)][_0x2f348d(0xc0)](_0x2f348d(0xf2)),hyouji[_0x2f348d(0xdc)]=_0x2f348d(0x102)+f+_0x2f348d(0xe1);}let mains=function(){main();};function timer(){const _0x369d32=_0x57aaee;i==0x0&&(setInterval(mains,0x3e8),time[_0x369d32(0xdc)]='残り時間:180秒');}let name;function main(){const _0x4a8900=_0x57aaee;i++,time[_0x4a8900(0xdc)]=_0x4a8900(0xdb)+(gametime-i)+'秒';if(i==gametime-0xa){let _0x2517cd=document[_0x4a8900(0xe4)](_0x4a8900(0xe8));_0x2517cd[_0x4a8900(0xe7)][_0x4a8900(0xea)]=_0x4a8900(0xd6),_0x2517cd[_0x4a8900(0xee)][_0x4a8900(0xc0)](_0x4a8900(0xd1));}if(i==gametime){document[_0x4a8900(0x105)](_0x4a8900(0xc8))[_0x4a8900(0xff)]('click',()=>{const _0x23083e=_0x4a8900;name=document[_0x23083e(0xe4)]('name-input')['value'],name[_0x23083e(0xf7)]<0xa?(document[_0x23083e(0xe4)]('ranking')[_0x23083e(0xe7)][_0x23083e(0xce)]=_0x23083e(0xc9),document['getElementById']('end')[_0x23083e(0xe7)]['display']='block',document[_0x23083e(0xe4)](_0x23083e(0xf6))[_0x23083e(0xe7)][_0x23083e(0xce)]='block',setData(0x1)):alert('文字数オーバーです!10文字以内に修正して下さい。\x0aOver\x20the\x20number\x20of\x20characters!\x20Please\x20correct\x20within\x2010\x20characters');}),document[_0x4a8900(0x105)](_0x4a8900(0xe2))[_0x4a8900(0xff)](_0x4a8900(0xfb),()=>{const _0x7e4f03=_0x4a8900;name=document['getElementById']('name-input')[_0x7e4f03(0xfa)],document['getElementById'](_0x7e4f03(0xef))[_0x7e4f03(0xe7)][_0x7e4f03(0xce)]=_0x7e4f03(0xc9),document[_0x7e4f03(0xe4)](_0x7e4f03(0x100))[_0x7e4f03(0xe7)][_0x7e4f03(0xce)]='block',document[_0x7e4f03(0xe4)](_0x7e4f03(0xf6))[_0x7e4f03(0xe7)][_0x7e4f03(0xce)]=_0x7e4f03(0xfd),setData(0x0);});f!=0x0?rankCheck():(document[_0x4a8900(0xe4)]('end')[_0x4a8900(0xe7)]['display']=_0x4a8900(0xfd),document[_0x4a8900(0xe4)](_0x4a8900(0xf6))[_0x4a8900(0xe7)][_0x4a8900(0xce)]=_0x4a8900(0xfd));let _0x48eaa6=document[_0x4a8900(0xe4)](_0x4a8900(0xfe));_0x48eaa6[_0x4a8900(0xe7)][_0x4a8900(0xce)]='none';let _0x4d2709=Math[_0x4a8900(0xc6)](textcounts/0xb4*0x64)/0x64,_0x380932=document[_0x4a8900(0x105)](_0x4a8900(0xe6)),_0x1488fc=document[_0x4a8900(0x105)](_0x4a8900(0xc4)),_0x112024=document[_0x4a8900(0x105)]('.result-titlevalue'),_0xbfb6be=['階数','速さ',_0x4a8900(0xb9),_0x4a8900(0xb8)],_0x5d84f9=[f,_0x4d2709,textcounts,miss],_0x4ada70=[_0x4a8900(0xe1),_0x4a8900(0xcc),'文字','回'];for(let _0x11c848=0x0;_0x11c848<_0xbfb6be[_0x4a8900(0xf7)];_0x11c848++){let _0x5d6cac=document['createElement'](_0x4a8900(0xf8));_0x5d6cac[_0x4a8900(0xdc)]=_0xbfb6be[_0x11c848],_0x380932[_0x4a8900(0xc7)](_0x5d6cac);}for(let _0x3fcd6d=0x0;_0x3fcd6d<_0xbfb6be[_0x4a8900(0xf7)];_0x3fcd6d++){let _0x436f72=document[_0x4a8900(0xd0)]('div');_0x436f72['textContent']=_0x5d84f9[_0x3fcd6d],_0x1488fc[_0x4a8900(0xc7)](_0x436f72);}for(let _0x1ad9c9=0x0;_0x1ad9c9<_0xbfb6be[_0x4a8900(0xf7)];_0x1ad9c9++){let _0x17db8d=document[_0x4a8900(0xd0)]('div');_0x17db8d['textContent']=_0x4ada70[_0x1ad9c9],_0x112024[_0x4a8900(0xc7)](_0x17db8d);}text=f+_0x4a8900(0xfc)+textcounts+_0x4a8900(0xf1)+_0x4d2709+_0x4a8900(0xf4)+miss+'文字';}document['getElementById']('retry-btn')['onclick']=function(){const _0x2979b6=_0x4a8900;location[_0x2979b6(0xbf)]();},document[_0x4a8900(0xe4)](_0x4a8900(0xbd))[_0x4a8900(0xc5)]=function(){const _0x1e7e7f=_0x4a8900;_0x528e01(text,_0x1e7e7f(0xe9),_0x1e7e7f(0x103));function _0x528e01(_0x4d0e30,_0x1d7da1,_0x1813c7,_0x467c10){const _0x4d55ab=_0x1e7e7f;let _0x2d910a='https://twitter.com/intent/tweet?text='+_0x4d0e30+_0x4d55ab(0xd2)+_0x1d7da1+_0x4d55ab(0xf9)+_0x1813c7;window[_0x4d55ab(0xf3)](_0x2d910a,'_blank');}};}