Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document wombat settings and change wombat mode to fix major issue of MDN ZIM #334

Merged
merged 4 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Upgrade to wombat 3.8.6 (#334)
- Fix wombat setup settings (especially `isSW`) (#293)

## [2.1.3] - 2024-11-01

### Changed
Expand Down
17 changes: 12 additions & 5 deletions javascript/src/wombatSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,21 @@ export function getWombatInfo(
// The host of the original url
wombat_host: orig_host,

// Extra options ?
wombat_opts: {},
// We are not running inside a service worker, wombat needs to know about it since
// some "magic" URLs like blobs are not available
isSW: false,

// ?
enable_auto_fetch: true,
// Convert all post request to get request
convert_post_to_get: true,

// Not used, we are not replaying in a frame
target_frame: '___wb_replay_top_frame',
isSW: true,

// Not used, we are not running in live mode
enable_auto_fetch: false,

// Extra options, not used
wombat_opts: {},
};
}

Expand Down
4 changes: 2 additions & 2 deletions javascript/test/wombatSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ test('nominalWbInfo', (t) => {
);
t.is(wmInfo.coll, '');
t.is(wmInfo.convert_post_to_get, true);
t.is(wmInfo.enable_auto_fetch, true);
t.is(wmInfo.isSW, true);
t.is(wmInfo.enable_auto_fetch, false);
t.is(wmInfo.isSW, false);
t.is(wmInfo.is_framed, false);
t.is(wmInfo.is_live, false);
t.is(wmInfo.mod, '');
Expand Down
2 changes: 1 addition & 1 deletion openzim.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ execute_after=[

[files.assets.actions."wombat.js"]
action="get_file"
source="https://cdn.jsdelivr.net/npm/@webrecorder/[email protected].3/dist/wombat.js"
source="https://cdn.jsdelivr.net/npm/@webrecorder/[email protected].6/dist/wombat.js"
target_file="wombat.js"

[files.assets.actions."wombatSetup.js"] # fallback if this script has not been properly build (should happen only in dev)
Expand Down