Skip to content

Commit 283b8fe

Browse files
committed
Support both ?expr= and ?code= URL parameters
1 parent adb494b commit 283b8fe

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

examples/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,9 +1602,11 @@ <h3><i data-lucide="table-properties" class="icon"></i> Interactive Table Demo</
16021602
// Check URL for expression parameter
16031603
function checkUrlExpr() {
16041604
const params = new URLSearchParams(window.location.search);
1605-
const expr = params.get('expr');
1605+
// Support both ?expr= and ?code= parameters
1606+
const expr = params.get('expr') || params.get('code');
16061607
if (expr && rf) {
1607-
evaluate(decodeURIComponent(expr));
1608+
// URL params are already decoded by URLSearchParams
1609+
evaluate(expr);
16081610
}
16091611
}
16101612

0 commit comments

Comments
 (0)