electron app:

- add file association for .wacz
- support opening wacz, warc, har files via double-click from os (fixes #24)
- command line: support opening files via command line, as well as specifying --url and --ts
- support cmdline args via 'yarn run start-electron <file> --url <url> --ts <ts>'
This commit is contained in:
Ilya Kreymer
2020-10-25 09:04:40 -07:00
parent 94dbf0fd77
commit e12407983c
6 changed files with 165 additions and 119 deletions
+9
View File
@@ -374,6 +374,15 @@ class App extends LitElement
}
this.loadInfo.customColl = this.pageParams.get("customColl");
}
if (IS_APP && this.sourceUrl.startsWith("file://")) {
const url = new URL(__APP_FILE_SERVE_PREFIX__);
url.searchParams.set("filename", this.sourceUrl.slice("file://".length));
this.loadInfo = {
sourceUrl: this.sourceUrl,
loadUrl: url.href,
}
}
}
onStartLoad(event) {