Further firefox fixes
This commit is contained in:
parent
4170874f3d
commit
bf8b3253b9
|
@ -2,11 +2,11 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Redirecting to shapez.io</title>
|
<title>Redirecting to shapez.io</title>
|
||||||
<meta http-equiv="refresh" content="0; URL=https://shapez.io" />
|
<meta http-equiv="refresh" content="0; URL=https://shapez.io?embed=kongregate" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="background: #333438; color: #eee;">
|
<body style="background: #333438; color: #eee;">
|
||||||
Redirecting you to
|
Redirecting you to
|
||||||
<a href="https://shapez.io" style="color: #39f; text-decoration: none;">shapez.io</a>
|
<a href="https://shapez.io?embed=kongregate" style="color: #39f; text-decoration: none;">shapez.io</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -228,6 +228,7 @@ export class Application {
|
||||||
* @param {Event} event
|
* @param {Event} event
|
||||||
*/
|
*/
|
||||||
handleVisibilityChange(event) {
|
handleVisibilityChange(event) {
|
||||||
|
window.focus();
|
||||||
const pageVisible = !document[pageHiddenPropName];
|
const pageVisible = !document[pageHiddenPropName];
|
||||||
if (pageVisible !== this.pageVisible) {
|
if (pageVisible !== this.pageVisible) {
|
||||||
this.pageVisible = pageVisible;
|
this.pageVisible = pageVisible;
|
||||||
|
@ -267,6 +268,7 @@ export class Application {
|
||||||
|
|
||||||
onAppRenderableStateChanged(renderable) {
|
onAppRenderableStateChanged(renderable) {
|
||||||
logger.log("Application renderable:", renderable);
|
logger.log("Application renderable:", renderable);
|
||||||
|
window.focus();
|
||||||
if (!renderable) {
|
if (!renderable) {
|
||||||
this.stateMgr.getCurrentState().onAppPause();
|
this.stateMgr.getCurrentState().onAppPause();
|
||||||
} else {
|
} else {
|
||||||
|
@ -326,6 +328,8 @@ export class Application {
|
||||||
this.ticker.frameEmitted.add(this.onFrameEmitted, this);
|
this.ticker.frameEmitted.add(this.onFrameEmitted, this);
|
||||||
this.ticker.bgFrameEmitted.add(this.onBackgroundFrame, this);
|
this.ticker.bgFrameEmitted.add(this.onBackgroundFrame, this);
|
||||||
this.ticker.start();
|
this.ticker.start();
|
||||||
|
|
||||||
|
window.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -155,6 +155,7 @@ export class ClickDetector {
|
||||||
* @param {Event} event
|
* @param {Event} event
|
||||||
*/
|
*/
|
||||||
internalPreventClick(event) {
|
internalPreventClick(event) {
|
||||||
|
window.focus();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,6 +302,8 @@ export class ClickDetector {
|
||||||
* @param {TouchEvent|MouseEvent} event
|
* @param {TouchEvent|MouseEvent} event
|
||||||
*/
|
*/
|
||||||
internalOnPointerDown(event) {
|
internalOnPointerDown(event) {
|
||||||
|
window.focus();
|
||||||
|
|
||||||
if (!this.internalEventPreHandler(event, 1)) {
|
if (!this.internalEventPreHandler(event, 1)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -369,6 +372,8 @@ export class ClickDetector {
|
||||||
* @param {TouchEvent|MouseEvent} event
|
* @param {TouchEvent|MouseEvent} event
|
||||||
*/
|
*/
|
||||||
internalOnPointerEnd(event) {
|
internalOnPointerEnd(event) {
|
||||||
|
window.focus();
|
||||||
|
|
||||||
if (!this.internalEventPreHandler(event, 0)) {
|
if (!this.internalEventPreHandler(event, 0)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,10 +28,6 @@ export class PlatformWrapperImplBrowser extends PlatformWrapperInterface {
|
||||||
this.embedProvider.iframed = true;
|
this.embedProvider.iframed = true;
|
||||||
this.embedProvider.iogLink = false;
|
this.embedProvider.iogLink = false;
|
||||||
|
|
||||||
logger.log("Running focus-fix automatically");
|
|
||||||
window.focus();
|
|
||||||
setInterval(() => window.focus(), 1000);
|
|
||||||
|
|
||||||
switch (providerId) {
|
switch (providerId) {
|
||||||
case "armorgames": {
|
case "armorgames": {
|
||||||
this.embedProvider.id = "armorgames";
|
this.embedProvider.id = "armorgames";
|
||||||
|
|
Reference in New Issue