Skip to content

fix --multi hash decoding and add saner options#11396

Open
riknoll wants to merge 3 commits into
masterfrom
dev/riknoll/microbit-multi-hash
Open

fix --multi hash decoding and add saner options#11396
riknoll wants to merge 3 commits into
masterfrom
dev/riknoll/microbit-multi-hash

Conversation

@riknoll

@riknoll riknoll commented Jun 10, 2026

Copy link
Copy Markdown
Member

fixes microsoft/pxt-microbit#5397

as noted in that issue, the way to use the --multi page was to include a hash like this:

makecode.microbit.org/--multi#lefthash:|:righthash

where lefthash will end up being applied to the left iframe and righthash to the right iframe. however, because the delimeter includes the character |, it was often getting encoded automatically as %7c which breaks the parsing. this fixes that bug by calling decodeURIComponent on the hash to make sure all the percent encoded characters are parsed.

still, this is imo a silly way to structure that URL, so i've also added a new format that is easier to use. you can now add arguments using query string syntax like so:

makecode.microbit.org/--multi#left=lefthash&right=righthash

or, if you're just referencing two scripts, you can do this:

makecode.microbit.org/--multi#left=leftscript=_xxxxxxxxx&rightscript=_xxxxxxxxx

which will automatically add the pub: prefix to the hash for the iframes

@riknoll riknoll requested a review from a team June 10, 2026 21:58

@srietkerk srietkerk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

---multi# magic URL to open two shared projects

3 participants