1255-burgomaster icon indicating copy to clipboard operation
1255-burgomaster copied to clipboard

game became too slow because of language callbacks

Open Areso opened this issue 5 years ago • 0 comments

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
}

Areso avatar Jul 10 '19 11:07 Areso