mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
Set skipExisting to true, linting
This commit is contained in:
parent
c569a4e644
commit
bb30af9575
@ -11,9 +11,12 @@ class WabacReplay
|
|||||||
}
|
}
|
||||||
|
|
||||||
async init() {
|
async init() {
|
||||||
const scope = '/';
|
const scope = "/";
|
||||||
|
|
||||||
await navigator.serviceWorker.register("/static/sw.js?" + new URLSearchParams(this.queryParams).toString(), {scope});
|
await navigator.serviceWorker.register(
|
||||||
|
"/static/sw.js?" + new URLSearchParams(this.queryParams).toString(),
|
||||||
|
{ scope },
|
||||||
|
);
|
||||||
|
|
||||||
let initedResolve = null;
|
let initedResolve = null;
|
||||||
|
|
||||||
@ -36,7 +39,7 @@ class WabacReplay
|
|||||||
name: this.collName,
|
name: this.collName,
|
||||||
type: "live",
|
type: "live",
|
||||||
file: {"sourceUrl": `proxy:${proxyPrefix}`},
|
file: {"sourceUrl": `proxy:${proxyPrefix}`},
|
||||||
skipExisting: false,
|
skipExisting: true,
|
||||||
extraConfig: {
|
extraConfig: {
|
||||||
prefix: proxyPrefix,
|
prefix: proxyPrefix,
|
||||||
isLive: false,
|
isLive: false,
|
||||||
@ -56,9 +59,9 @@ class WabacReplay
|
|||||||
navigator.serviceWorker.controller.postMessage(msg);
|
navigator.serviceWorker.controller.postMessage(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('message', event => {
|
window.addEventListener("message", event => {
|
||||||
let data = event.data;
|
let data = event.data;
|
||||||
if (data.wb_type !== 'load') return;
|
if (data.wb_type !== "load") return;
|
||||||
history.replaceState({}, data.title, this.prefix + data.ts + '/' + data.url);
|
history.replaceState({}, data.title, this.prefix + data.ts + '/' + data.url);
|
||||||
window.WBBanner.onMessage(event);
|
window.WBBanner.onMessage(event);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user