Hi Webrecorder team,
I use ArchiveWeb.page to archive forum sites built on Invision Community (IPS). During replay, pagination within a topic doesn’t work — clicking “Page 2” leaves the page frozen on Page 1. The URL in the sidebar changes but the content doesn’t.
**Why this happens:**
IPS builds its pagination on AJAX. When you click “Page 2” on the live site, the site’s JavaScript fetches the next page’s content in the background and swaps it into the DOM. My archiver forces full-page navigations during the crawl, so ArchiveWeb.page records clean HTML pages — but the *original* IPS JavaScript is still saved with them. When I click “Page 2” in replay, the archived JavaScript tries to make the AJAX request that was never recorded. The request fails silently and the DOM never updates.
**Why I can’t work around it:**
I’ve tried injecting a userscript via Tampermonkey to intercept pagination clicks and force a `window.location.assign()`. This works fine on the live site. It does not work during replay because:
1. ArchiveWeb.page serves replayed pages inside an `iframe` whose URL is `chrome-extension:///…`
2. Tampermonkey’s `@match` rules are evaluated against that `chrome-extension://` URL
3. Tampermonkey refuses to inject userscripts into extension-served frames (security policy)
4. I confirmed this by checking `window.location.href` inside the replay frame — it returns the `chrome-extension://` URL, and Tampermonkey never fires
**The feature request:**
Please add a “Custom JavaScript” field to ArchiveWeb.page’s settings, similar to what other web-archiving tools offer. Content pasted there would be injected into every replayed page’s document, before the page’s own scripts run. The field could be:
- Global (applies to all collections) or
- Per-collection (applies to one archive)
**How it would help my use case:**
With ~15 lines of JavaScript injected into every replayed page, I can intercept pagination clicks in the capture phase, stop the broken AJAX handler, and force a full `window.location.assign()` to the recorded Page 2 URL. ArchiveWeb.page’s Service Worker then serves the recorded page from the archive — exactly the same way clicking the sidebar works today. This is the only thing preventing multi-page topics from being navigable during replay.
**What I’ve verified on my end:**
- The replayed page’s HTML is intact and correct
- The sidebar can open any recorded page successfully
- The URL of the inner frame is confirmed to be `chrome-extension://…`
- The pagination click handler in the archived IPS JavaScript can be intercepted with a capture-phase listener, but only from inside the frame itself — Tampermonkey cannot reach it
This is not specific to Invision Community. Any archived site with client-side routing (AJAX pagination, SPA navigation, infinite scroll) has the same problem in replay, and the same feature would fix all of them.
**Alternative implementations** if a script field is too broad:
- A “Pagination Fix” toggle that automatically intercepts `a[href*=“page=”]` clicks in replay
- A per-collection “inject script” field accessible from the collection settings dialog
Thank you for the work on this tool. Let me know if you’d like a minimal reproduction case.