Skip to content

Commit

Permalink
chore: Use _shinylive-mode for query parameter in exported apps (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie authored Jul 3, 2024
1 parent 404faf6 commit 2baf804
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion export_template/edit/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Redirect to editable app</title>
<meta
http-equiv="refresh"
content="0;URL='../index.html?mode=editor-terminal-viewer'"
content="0;URL='../index.html?_shinylive-mode=editor-terminal-viewer'"
/>
</head>
<body></body>
Expand Down
2 changes: 1 addition & 1 deletion src/Components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ export async function runExportedApp({

// Get `appMode` from the URL query string
const urlParams = new URLSearchParams(window.location.search);
let appMode = urlParams.get("mode") ?? "viewer";
let appMode = urlParams.get("_shinylive-mode") ?? "viewer";

if (!AppModes.includes(appMode)) {
console.warn(`[shinylive] Unrecognized app mode: ${appMode}`);
Expand Down

0 comments on commit 2baf804

Please sign in to comment.