Extension:ScratchProject
Appearance
ScratchProject Release status: stable |
|
---|---|
Implementation | Tag |
Description | Embeds ScratchProject |
Author(s) | Funa-enpitutalk |
Latest version | 1.1.2 (2023-11-22) |
MediaWiki | 1.39.5+ |
License | Creative Commons Attribution Share Alike 4.0 |
Download | ScratchProject.tar.gz (1.87KB) |
Example | Try it out on my test wiki! Scratch非公式Wiki |
<scratchproject> |
|
The ScratchProject extension allows users to embed Scratch and TurboWarp project.
Installation
[edit]- Download and place the file(s) in a directory called
ScratchProject
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'ScratchProject' );
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Usage
[edit]<scratchproject project-id="foo" />
where foo
is the project ID from the URL. i.e. if the project's URL is https://scratch.mit.edu/projects/407071838/, then the embed code would be:
<scratchproject project-id="407071838" />
Output: [1]
If you are using $wgCSPHeader
: You need to add "https://scratch.mit.edu/" to script-src
in $wgCSPHeader
.
TurboWarp
[edit]If embed TurboWarp project: Add turbowarp
property.
<scratchproject project-id="407071838" turbowarp />
Output: [2]
URL Parameters
[edit]You can set URL parameters by specifying a value for the turbowarp
property.
For parameter values, see Embedding | TurboWarp Documentation and URL Parameters | TurboWarp Documentation.
<scratchproject project-id="407071838" turbowarp="autoplay&settings-button&addons=pause,clones" />
Output:[3]