Skip to content

Commit 7784295

Browse files
committed
simplify: use existing prefix as archivePrefix, fixes #937
update to wabac.js 2.22.15 bump to 2.9.0b1
1 parent 3081e0f commit 7784295

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

pywb/static/loadWabac.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ class WabacReplay
77
this.staticPrefix = staticPrefix;
88
this.collName = coll;
99
this.isRoot = coll === "$root";
10-
this.archivePrefix = this.isRoot ? "/" : `/${this.collName}/`;
1110
this.swScope = swScopePrefix;
1211
this.adblockUrl = undefined;
1312

@@ -51,7 +50,7 @@ class WabacReplay
5150
baseUrl: this.prefix,
5251
baseUrlAppendReplay: true,
5352
noPostToGet: false,
54-
archivePrefix: this.archivePrefix,
53+
archivePrefix: this.prefix,
5554
archiveMod: "ir_",
5655
adblockUrl: this.adblockUrl,
5756
noPostToGet: true,
@@ -86,6 +85,6 @@ class WabacReplay
8685
// called by the Vue banner when the timeline is clicked
8786
load_url(url, ts) {
8887
const iframe = document.querySelector('#replay_iframe');
89-
iframe.src = `${this.swScope}${this.archivePrefix}${ts}mp_/${url}`;
88+
iframe.src = `${this.prefix}${ts}mp_/${url}`;
9089
}
9190
}

pywb/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '2.9.0-beta.0'
1+
__version__ = '2.9.0b1'
22

33
if __name__ == '__main__':
44
print(__version__)

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
root_dir = pathlib.Path(__file__).parent
1616

1717

18-
WABAC_SW_URL = "https://cdn.jsdelivr.net/npm/@webrecorder/[email protected].12/dist/sw.js"
18+
WABAC_SW_URL = "https://cdn.jsdelivr.net/npm/@webrecorder/[email protected].15/dist/sw.js"
1919

2020
def download_wabac_sw():
2121
print(f"Downloading {WABAC_SW_URL}")

0 commit comments

Comments
 (0)