Attempt to prevent Alu from allowing Epoxy to load, as it causes the tab to hang (firefox bug)
This commit is contained in:
parent
c56fff2e78
commit
774f26066b
3 changed files with 15 additions and 5 deletions
|
|
@ -1,5 +1,7 @@
|
|||
importScripts("/libcurl/index.js");
|
||||
importScripts("/epoxy/index.js");
|
||||
if (!navigator.userAgent.includes("Firefox")) {
|
||||
importScripts("/epoxy/index.js");
|
||||
}
|
||||
importScripts("/bare_transport.js")
|
||||
importScripts("/uv/uv.bundle.js");
|
||||
importScripts("/uv.config.js");
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@ export default class TransportManager {
|
|||
if (transport) {
|
||||
this.transport = transport;
|
||||
}
|
||||
if (navigator.userAgent.includes("Firefox")) {
|
||||
this.transport = "BareMod.BareClient";
|
||||
}
|
||||
if (localStorage.getItem("alu__selectedTransport") != null && !transport) {
|
||||
this.transport = JSON.parse(localStorage.getItem("alu__selectedTransport")!).value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,9 +73,14 @@ export function getStaticPaths() {
|
|||
await initTransport();
|
||||
});
|
||||
// Inject Epoxy, Libcurl, and Bare scripts into the DOM
|
||||
// Firefox doesn't support the Epoxy transport, so we don't want to inject it.
|
||||
if (!(navigator.userAgent.indexOf("Firefox") > 0)) {
|
||||
let epoxyScript = document.createElement("script");
|
||||
epoxyScript.src = "/epoxy/index.js";
|
||||
document.body.appendChild(epoxyScript);
|
||||
} else {
|
||||
console.log("Firefox detected, not injecting Epoxy transport!");
|
||||
}
|
||||
let libcurlScript = document.createElement("script");
|
||||
libcurlScript.src = "/libcurl/index.js";
|
||||
document.body.appendChild(libcurlScript);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue