Multiple firefox fixes

This commit is contained in:
tobspr 2020-05-25 11:57:06 +02:00
parent 20b46325b6
commit d2903f5606
9 changed files with 38 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 904 KiB

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<title>Iframe test</title>
</head>
<body style="background: #333438; color: #eee;"></body>
<iframe
src="http://localhost:3005?embed=kongregate"
width="800"
height="600"
scrolling="auto"
frameborder="0"
border="0"
allowfullscreen
></iframe>
</html>

View File

@ -309,6 +309,7 @@ export class Application {
* Boots the application
*/
boot() {
console.log("Booting ...");
this.registerStates();
this.registerEventListeners();

View File

@ -101,7 +101,8 @@ export const globalConfig = {
// framePausesBetweenTicks: 40,
// testTranslations: true,
// enableEntityInspector: true,
testAds: true,
// testAds: true,
disableMapOverview: true,
/* dev:end */
},
@ -123,3 +124,8 @@ export const IS_MOBILE = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
// Automatic calculations
globalConfig.minerSpeedItemsPerSecond = globalConfig.beltSpeedItemsPerSecond / 5;
if (globalConfig.debug.disableMapOverview) {
globalConfig.mapChunkOverviewMinZoom = 0;
globalConfig.mapChunkPrerenderMinZoom = 0;
}

View File

@ -201,7 +201,7 @@ export class InputDistributor {
// TAB
event.keyCode === 9 ||
// F1 - F10
(event.keyCode >= 112 && event.keyCode < 122 && !G_IS_DEV)
(event.keyCode >= 112 && event.keyCode < 122)
) {
event.preventDefault();
}

View File

@ -84,7 +84,7 @@ class LoaderImpl {
return Promise.race([
new Promise((resolve, reject) => {
setTimeout(reject, G_IS_DEV ? 3000 : 60000);
setTimeout(reject, G_IS_DEV ? 500 : 10000);
}),
new Promise(resolve => {

View File

@ -23,7 +23,7 @@ class SoundSpritesContainer {
}
return (this.loadingPromise = Promise.race([
new Promise((resolve, reject) => {
setTimeout(reject, G_IS_DEV ? 5000 : 60000);
setTimeout(reject, G_IS_DEV ? 500 : 5000);
}),
new Promise(resolve => {
this.howl = new Howl({
@ -100,7 +100,7 @@ class MusicInstance extends MusicInstanceInterface {
load() {
return Promise.race([
new Promise((resolve, reject) => {
setTimeout(reject, G_IS_DEV ? 5000 : 60000);
setTimeout(reject, G_IS_DEV ? 500 : 5000);
}),
new Promise((resolve, reject) => {
this.howl = new Howl({

View File

@ -28,6 +28,15 @@ export class PlatformWrapperImplBrowser extends PlatformWrapperInterface {
this.embedProvider.iframed = true;
this.embedProvider.iogLink = false;
window.addEventListener(
"mousedown",
() => {
console.log("Firefox fix: focusing window");
window.focus();
},
true
);
switch (providerId) {
case "armorgames": {
this.embedProvider.id = "armorgames";