1255-burgomaster
1255-burgomaster copied to clipboard
game became too slow because of language callbacks
Make a check whether the game loaded locally or not. If loaded from a web-server then load localizations as text files. If loaded from a local drive then load localizations as js files.
if (document.location.host) {
// remote file over http or https
} else {
// local file
}
switch(window.location.protocol) {
case 'http:':
case 'https:':
//remote file over http or https
break;
case 'file:':
//local file
break;
default:
//some other protocol
}