Extension:ScratchProject
From Linux Web Expert
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> |
|
Quarterly downloads | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Public wikis using | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
The ScratchProject extension allows users to embed Scratch and TurboWarp project.
Installation
- <translate> Download and place the file(s) in a directory called <tvar name=name>
ScratchProject
</tvar> in your <tvar name=ext>extensions/
</tvar> folder.</translate> - <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
wfLoadExtension( 'ScratchProject' );
- File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
Usage
<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
If embed TurboWarp project: Add turbowarp
property.
<scratchproject project-id="407071838" turbowarp />
Output: [2]
URL Parameters
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]