chore: sync from Academia-LMS 4eff528

This commit is contained in:
dasemu committed 2026-10-28 15:54:35 +01:00
1 parent dc8475d107
commit 0687af7f92
6 files changed
+896 -2

No files matched your search

+28 -2
View File
@@ -1,3 +1,29 @@
# futuredev-scratch-editor
# FutureDev Scratch editor
Scratch 3 editor embedded in the FutureDev student portal (AGPL-3.0 corresponding source)
Corresponding source of the Scratch 3 editor/player embedded in the FutureDev Academy student
portal, published to comply with the AGPL-3.0 (§13).
The editor is the unmodified [`@scratch/scratch-gui`](https://github.com/scratchfoundation/scratch-editor)
standalone build (AGPL-3.0-only, © Scratch Foundation). Our changes are:
- `scripts/scratch/index.html`: wrapper page (Spanish locale, editor or player mode, CSP).
- `scripts/scratch/storage-shim.js`: in-memory `localStorage`/cookies for the sandboxed iframe.
- `scripts/scratch/bridge.js`: `postMessage` bridge to load and save `.sb3` projects.
- `scripts/build-scratch.sh`: downloads the pinned package, rewrites the webpack public path to
`/scratch/` and assembles the output.
## Build
Needs Node.js, npm and network access:
```bash
SCRATCH_OUT=./dist scripts/build-scratch.sh
```
Serve `dist/` at `/scratch/` and embed `/scratch/index.html?mode=editor` (or `mode=player`) in a
sandboxed iframe (`sandbox="allow-scripts"`).
## License
AGPL-3.0, see `LICENSE`. Scratch is a project of the Scratch Foundation; the Scratch name, logo
and Scratch Cat are its trademarks and are not covered by this license.