(filename)
| 30 | }; |
| 31 | }); |
| 32 | function fetchFile(filename){ |
| 33 | var xhr = new XMLHttpRequest(); |
| 34 | xhr.onreadystatechange = function(){ |
| 35 | if(xhr.readyState === 4 && xhr.status== 200){ |
| 36 | $("code-input").value = xhr.responseText; |
| 37 | }else if(xhr.readyState === 4){ |
| 38 | bscripter.logger.warn("Load file failed. Server responded with status code " + xhr.status + "."); |
| 39 | } |
| 40 | }; |
| 41 | xhr.open("GET", filename, true); |
| 42 | xhr.send(); |
| 43 | } |
| 44 | function onResize(){ |
| 45 | $("player").style.perspective = $("player").offsetWidth * Math.tan(40 * Math.PI/180) / 2 + "px"; |
| 46 | $("player").webkitPerspective = $("player").offsetWidth * Math.tan(40 * Math.PI/180) / 2 + "px"; |
no test coverage detected