replaywebpage 1.6.1 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.html +13 -0
- package/package.json +4 -3
- package/src/appmain.js +8 -0
- package/src/coll.js +3 -1
- package/src/embed.js +6 -0
- package/src/loader.js +17 -11
- package/src/pageutils.js +1 -1
- package/sw.js +2 -2
- package/ui.js +12 -12
package/index.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html class="no-overflow">
|
|
3
|
+
<head>
|
|
4
|
+
<link rel="manifest" href="/webmanifest.json">
|
|
5
|
+
<link rel="icon" href="build/icon.png" type="image/png" />
|
|
6
|
+
<title>ReplayWeb.page</title>
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
|
+
<script src="./ui.js"></script>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<replay-app-main></replay-app-main>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "replaywebpage",
|
|
3
3
|
"productName": "ReplayWeb.page",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.4",
|
|
5
5
|
"description": "Serverless Web Archive Replay",
|
|
6
6
|
"repository": "https://github.com/webrecorder/replayweb.page",
|
|
7
7
|
"homepage": "https://replayweb.page/",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"license": "AGPL-3.0-or-later",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@fortawesome/fontawesome-free": "^5.15.4",
|
|
12
|
-
"@webrecorder/wabac": "^2.12.
|
|
12
|
+
"@webrecorder/wabac": "^2.12.3",
|
|
13
13
|
"bulma": "^0.9.3",
|
|
14
14
|
"electron-log": "^4.4.1",
|
|
15
15
|
"electron-updater": "^4.3.9",
|
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
"/ruffle",
|
|
52
52
|
"sw.js",
|
|
53
53
|
"ui.js",
|
|
54
|
-
"index.js"
|
|
54
|
+
"index.js",
|
|
55
|
+
"index.html"
|
|
55
56
|
],
|
|
56
57
|
"scripts": {
|
|
57
58
|
"build": "webpack --mode production",
|
package/src/appmain.js
CHANGED
|
@@ -386,6 +386,14 @@ class ReplayWebApp extends LitElement
|
|
|
386
386
|
this.loadInfo.noWebWorker = true;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
|
+
|
|
390
|
+
if (this.pageParams.get("noCache") === "1") {
|
|
391
|
+
if (!this.loadInfo) {
|
|
392
|
+
this.loadInfo = {};
|
|
393
|
+
}
|
|
394
|
+
this.loadInfo.noCache = true;
|
|
395
|
+
}
|
|
396
|
+
|
|
389
397
|
if (IS_APP && this.sourceUrl.startsWith("file://")) {
|
|
390
398
|
// eslint-disable-next-line no-undef
|
|
391
399
|
const url = new URL(__APP_FILE_SERVE_PREFIX__);
|
package/src/coll.js
CHANGED
|
@@ -66,6 +66,7 @@ class Coll extends LitElement
|
|
|
66
66
|
|
|
67
67
|
this.editable = false;
|
|
68
68
|
this.browsable = true;
|
|
69
|
+
this.clearable = true;
|
|
69
70
|
|
|
70
71
|
this.showSidebar = localStorage.getItem("pages:showSidebar") === "1";
|
|
71
72
|
this.splitter = null;
|
|
@@ -108,6 +109,7 @@ class Coll extends LitElement
|
|
|
108
109
|
embed: { type: String },
|
|
109
110
|
editable: { type: Boolean },
|
|
110
111
|
browsable: { type: Boolean },
|
|
112
|
+
clearable: { type: Boolean },
|
|
111
113
|
|
|
112
114
|
isVisible: { type: Boolean },
|
|
113
115
|
|
|
@@ -844,7 +846,7 @@ class Coll extends LitElement
|
|
|
844
846
|
<span>Browse Contents</span>
|
|
845
847
|
</a>` : ""}
|
|
846
848
|
${this.renderExtraToolbar(true)}
|
|
847
|
-
${
|
|
849
|
+
${this.clearable ? html`
|
|
848
850
|
<hr class="dropdown-divider is-hidden-desktop">
|
|
849
851
|
<a href="#" role="button" class="dropdown-item" @click="${this.onPurgeCache}" @keyup="${clickOnSpacebarPress}">
|
|
850
852
|
<span class="icon is-small">
|
package/src/embed.js
CHANGED
|
@@ -35,6 +35,7 @@ class Embed extends LitElement
|
|
|
35
35
|
this.reloadCount = 0;
|
|
36
36
|
this.noSandbox = false;
|
|
37
37
|
this.noWebWorker = false;
|
|
38
|
+
this.noCache = false;
|
|
38
39
|
this.logo = rwpLogo;
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -70,6 +71,7 @@ class Embed extends LitElement
|
|
|
70
71
|
deepLink: { type: Boolean },
|
|
71
72
|
noSandbox: { type: Boolean },
|
|
72
73
|
noWebWorker: { type: Boolean },
|
|
74
|
+
noCache: { type: Boolean },
|
|
73
75
|
|
|
74
76
|
errorMessage: { type: String }
|
|
75
77
|
};
|
|
@@ -178,6 +180,10 @@ class Embed extends LitElement
|
|
|
178
180
|
params.noWebWorker = "1";
|
|
179
181
|
}
|
|
180
182
|
|
|
183
|
+
if (this.noCache) {
|
|
184
|
+
params.noCache = "1";
|
|
185
|
+
}
|
|
186
|
+
|
|
181
187
|
this.paramString = new URLSearchParams(params).toString();
|
|
182
188
|
|
|
183
189
|
this.hashString = new URLSearchParams({
|
package/src/loader.js
CHANGED
|
@@ -185,27 +185,33 @@ You can select a file to upload from the main page by clicking the 'Choose File.
|
|
|
185
185
|
source = {sourceUrl};
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
source.newFullImport = (this.loadInfo && this.loadInfo.newFullImport);
|
|
189
|
-
|
|
190
188
|
this.state = "started";
|
|
191
189
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
name: this.coll,
|
|
195
|
-
skipExisting: true,
|
|
196
|
-
file: source
|
|
197
|
-
};
|
|
190
|
+
let type = undefined;
|
|
191
|
+
let extraConfig = undefined;
|
|
198
192
|
|
|
199
193
|
if (this.loadInfo) {
|
|
194
|
+
source.newFullImport = this.loadInfo.newFullImport;
|
|
195
|
+
source.noCache = this.loadInfo.noCache;
|
|
196
|
+
|
|
200
197
|
if (this.loadInfo.extraConfig) {
|
|
201
|
-
|
|
198
|
+
extraConfig = this.loadInfo.extraConfig;
|
|
202
199
|
}
|
|
203
200
|
// todo: too special case?
|
|
204
|
-
if (sourceUrl.startsWith("proxy:") &&
|
|
205
|
-
|
|
201
|
+
if (sourceUrl.startsWith("proxy:") && extraConfig && extraConfig.recording) {
|
|
202
|
+
type = "recordingproxy";
|
|
206
203
|
}
|
|
207
204
|
}
|
|
208
205
|
|
|
206
|
+
const msg = {
|
|
207
|
+
msg_type: "addColl",
|
|
208
|
+
name: this.coll,
|
|
209
|
+
extraConfig,
|
|
210
|
+
type,
|
|
211
|
+
skipExisting: true,
|
|
212
|
+
file: source
|
|
213
|
+
};
|
|
214
|
+
|
|
209
215
|
if (!navigator.serviceWorker.controller) {
|
|
210
216
|
await new Promise((resolve) => {
|
|
211
217
|
navigator.serviceWorker.addEventListener("controllerchange", () => resolve());
|