On all browsers: Resource interpreted as Script but transferred with MIME type text/plain:"file:///E:/Projetions%20Matcher/Canvas/jquery.min.js".
So jquery.min.js is loaded, but livello.js isn't. Why?
EDIT: I attempted to load it on a server but there was the same error
HTML: ....
<script src="jquery.min.js" type="text/javascript"></script>
<script src="livello.js" type="text/javascript"></script>
....
livello.js:
var c=document.getElementById("app");
var ctx=c.getContext("2d");
function resize(){
c.style.width = window.innerWidth + 'px';
c.style.height = window.innerHeight + 'px';
var gameWidth = window.innerWidth;
var gameHeight = window.innerHeight;
var scaleToFitX = gameWidth / c.width;
var scaleToFitY = gameHeight / c.height;
var currentScreenRatio = gameWidth / gameHeight;
var optimalRatio = Math.min(scaleToFitX, scaleToFitY);
c.style.width = c.width * optimalRatio + "px";
c.style.height = c.height * optimalRatio + "px";
}
window.onresize=function(){resize();};
function clean()
{c.width=window.innerWidth;
c.height=window.innerHeight;}
clean();