diff --git a/javascript/index.html b/javascript/index.html index 50cdeb2d..115502e3 100644 --- a/javascript/index.html +++ b/javascript/index.html @@ -109,6 +109,10 @@ let tooLate = false; let patchNumber; + if (localStorage.getItem("isTabSettingsModEnabled") == null){ + localStorage.setItem("isTabSettingsModEnabled", false); + } + if (localStorage.getItem("isTabSettingsModEnabled")){ document.title = localStorage.getItem("tabTitle"); document.getElementById("favicon").href = localStorage.getItem("imageBase64"); @@ -315,6 +319,21 @@ } }); + + +
@@ -328,7 +347,279 @@
+ +
+ \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java index 64fd5ea1..156e413e 100644 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java @@ -117,9 +117,12 @@ public class PlatformRuntime { throw new RuntimeInitializationFailureException("Exception while registering window event handlers", t); } + + try { doc.exitPointerLock(); } catch (Throwable t) { + doMobileStuff(); isMobile = true; //throw new PlatformIncompatibleException("Mouse cursor lock is not available on this device!"); } @@ -189,6 +192,9 @@ public class PlatformRuntime { logger.info("Platform initialization complete"); } + @JSBody(params = { }, script = "doMobileStuff()") + public static native void doMobileStuff(); + @JSBody(params = { "event", "epkSize" }, script = "setBarProg(event, epkSize)") public static native void setBarProgress(Event event, int epkSize);