Skip to content
Closed
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
4 changes: 3 additions & 1 deletion src/Components/Viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ function setupAppProxyPath(proxy: PyodideProxy | WebRProxy): {
} {
const appName = `app_${utils.makeRandomKey(20)}`;
const urlPath = appName + "/";
// Pass through any query string or hash in the outer URL to the iframe url.
const srcPath = urlPath + window.location.search + window.location.hash;

if (!navigator.serviceWorker.controller) {
throw new Error("ServiceWorker controller was not found!");
Expand All @@ -49,7 +51,7 @@ function setupAppProxyPath(proxy: PyodideProxy | WebRProxy): {
}
});

return { appName, urlPath };
return { appName, urlPath: srcPath };
}

// Register the app path with the service worker
Expand Down