Skip to content

Add a Remix dropdown (CodeSandbox/Krabbel) to the gh-pages examples#5842

Merged
dmarcos merged 1 commit into
aframevr:masterfrom
vincentfretin:remix-dropdown
Jun 28, 2026
Merged

Add a Remix dropdown (CodeSandbox/Krabbel) to the gh-pages examples#5842
dmarcos merged 1 commit into
aframevr:masterfrom
vincentfretin:remix-dropdown

Conversation

@vincentfretin

@vincentfretin vincentfretin commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Description

Adds examples/js/remix-dropdown.js, injected into the published gh-pages examples (by scripts/preghpages.js) that reference the local A-Frame build.

The script adds a REMIX button above the AR/VR enter buttons with a dropdown to open the current example on CodeSandbox or Krabbel, deriving the example path from the page URL (and a ?file= parameter for non-index.html pages). It also repositions the CodeSandbox "Open Sandbox" button, and hides itself when the example is already running inside a remix preview (*.csb.app, *.krabbel.fun).

scripts/preghpages.js only injects the script into example pages whose links were rewritten, via a new processorIfChanged pass (no extra file read/write).

Screenshots

REMIX button (hover):
remix-hover

Dropdown open (hovering "Remix on Krabbel"):
remix-menu-krabbel

🤖 Generated with Claude Code

Inject examples/js/remix-dropdown.js into the published examples that
reference the local A-Frame build. The script adds a REMIX button above
the AR/VR enter buttons with a dropdown to open the current example on
CodeSandbox or Krabbel, deriving the example path from the page URL. It
also repositions the CodeSandbox "Open Sandbox" button and hides itself
when already running inside a remix preview (*.csb.app, *.krabbel.fun).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dmarcos dmarcos merged commit 5fb2d2a into aframevr:master Jun 28, 2026
1 check passed
@vincentfretin vincentfretin deleted the remix-dropdown branch June 28, 2026 18:02
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.

2 participants