Fix ruffle injection + disable gdrive in library build (#419)

library: disable GDrive integration in library build (for AWP use)
fidelity: Fix Ruffle injection, rewriting improvements (via wabac.js
2.22.17)
loading: Support .wacz.zip extension for loading WACZ files when .zip is
auto-added (eg. on Android devices)

deps: bump to wabac.js 2.22.17
bump to 2.3.8
This commit is contained in:
Ilya Kreymer
2025-05-06 21:07:24 -07:00
committed by GitHub
parent c0c196c225
commit 62c30e7838
8 changed files with 22 additions and 10 deletions
+1
View File
@@ -461,6 +461,7 @@ export class ReplayWebApp extends LitElement {
let query = "";
if (this.useRuffle) {
qp.set("injectScripts", "ruffle/ruffle.js");
qp.set("allowProxyPaths", "ruffle/");
}
if (this.embed) {
qp.set("serveIndex", "1");
+2 -2
View File
@@ -39,7 +39,7 @@ export class Chooser extends LitElement {
accept: {
"application/warc": [".warc", ".gz"],
"application/har": [".har"],
"application/wacz": [".wacz"],
"application/wacz": [".wacz", ".wacz.zip"],
"application/json": [".json"],
},
},
@@ -295,7 +295,7 @@ export class Chooser extends LitElement {
type="text"
name="filename"
id="filename"
pattern="((file|http|https|ipfs|s3)://.*.(warc|warc.gz|zip|wacz|har|json|cdx|cdxj)([?#].*)?)|(googledrive://.+)|(ssb://.+)"
pattern="((file|http|https|ipfs|s3)://.*.(warc|warc.gz|zip|wacz|wacz.zip|har|json|cdx|cdxj)([?#].*)?)|(googledrive://.+)|(ssb://.+)"
.value="${this.fileDisplayName}"
@input="${this.onInput}"
autocomplete="off"
+2 -2
View File
@@ -194,12 +194,12 @@ class GDrive extends LitElement {
}
script() {
if (this.state === "trypublic" || this.scriptLoaded) {
if (this.state === "trypublic" || this.scriptLoaded || !__GDRIVE_API__) {
return html``;
}
const script = document.createElement("script");
script.onload = () => this.onLoad();
script.src = "https://apis.google.com/js/platform.js";
script.src = __GDRIVE_API__;
return script;
}
+1
View File
@@ -5,6 +5,7 @@ declare module "*.sass";
declare const __SW_NAME__: string;
declare const __HELPER_PROXY__: string;
declare const __GDRIVE_CLIENT_ID__: string;
declare const __GDRIVE_API__: string;
declare const __VERSION__: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any