1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-04-04 12:55:49 +02:00

set to wabac.js 2.22.8

ensure history changes also update url in client-side replay mode
This commit is contained in:
Ilya Kreymer 2025-03-27 15:09:15 -07:00
parent 78cf834e75
commit 31dfd1f7d5
2 changed files with 7 additions and 6 deletions

View File

@ -67,9 +67,12 @@ class WabacReplay
window.addEventListener("message", event => {
let data = event.data;
if (data.wb_type !== "load") return;
history.replaceState({}, data.title, this.prefix + data.ts + '/' + data.url);
window.WBBanner.onMessage(event);
if (window.WBBanner) {
window.WBBanner.onMessage(event);
}
if (data.wb_type === "load" || data.wb_type === "replace-url") {
history.replaceState({}, data.title, this.prefix + data.ts + '/' + data.url);
}
});
window.cframe = this;

View File

@ -15,9 +15,7 @@ from pywb import __version__
root_dir = pathlib.Path(__file__).parent
#WABAC_SW_URL = "https://cdn.jsdelivr.net/npm/@webrecorder/wabac@2.21.4/dist/sw.js"
# for testing only, remove before merge
WABAC_SW_URL = "https://raw.githubusercontent.com/webrecorder/wabac.js/refs/heads/baseUrlAppendReplayOption/dist/sw.js"
WABAC_SW_URL = "https://cdn.jsdelivr.net/npm/@webrecorder/wabac@2.22.8/dist/sw.js"
def download_wabac_sw():
print(f"Downloading {WABAC_SW_URL}")