Skip to content

Scratch.org #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This repository contains documentation for TurboWarp.

## Writing content

If you found a typo or have a suggestion to improve the pages, the easiest way to get it resolved is to post about it on the Scratch profile https://scratch.mit.edu/users/GarboMuffin/#comments or in GitHub issues https://github.com/TurboWarp/docs/issues/new. Minor fixes get resolved very quickly usually.
If you found a typo or have a suggestion to improve the pages, the easiest way to get it resolved is to post about it on the Scratch profile https://scratch.org/users/GarboMuffin/#comments or in GitHub issues https://github.com/TurboWarp/docs/issues/new. Minor fixes get resolved very quickly usually.

Alternatively, you can submit a pull request yourself containing a fix. The easiest way to edit a page is:

Expand Down
2 changes: 1 addition & 1 deletion docs/development/extensions/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ In this tutorial, we will describe how to build custom extensions. The pages can
:::info
**We just rewrote this entire tutorial from the ground up.**

It uses a completely different structure and style. We hope it's easier to follow. There's a good chance there are some errors and omissions in this tutorial. [Let me know what you think](https://scratch.mit.edu/users/GarboMuffin/#comments). Thanks!
It uses a completely different structure and style. We hope it's easier to follow. There's a good chance there are some errors and omissions in this tutorial. [Let me know what you think](https://scratch.org/users/GarboMuffin/#comments). Thanks!
:::

When people refer to "extensions", there are a few things they could be referring to:
Expand Down
2 changes: 1 addition & 1 deletion docs/development/extensions/wrapping-up.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ hide_table_of_contents: true

We hope that you found this tutorial helpful. Please give feedback and ask questions:

- Feedback about the tutorial: https://scratch.mit.edu/users/GarboMuffin/#comments
- Feedback about the tutorial: https://scratch.org/users/GarboMuffin/#comments
- Bug tracker and suggestion tracker: https://github.com/TurboWarp/extensions/issues
- General discussion: https://github.com/TurboWarp/extensions/discussions

Expand Down
2 changes: 1 addition & 1 deletion docs/packager/commercial-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ If you used costumes, sounds, or scripts created by other people, make sure you

Note that the Scratch trademarks such as the Scratch Logo, Scratch cat, Gobo, Pico, etc. are an exception to the CC BY-SA 2.0 license, and you might not have permission to use them.

For more information, see "May I use / remix Scratch support materials, sprites, images, sounds or sample projects I’ve found on the website?" and "Can I sell my Scratch projects?" in https://scratch.mit.edu/faq
For more information, see "May I use / remix Scratch support materials, sprites, images, sounds or sample projects I’ve found on the website?" and "Can I sell my Scratch projects?" in https://scratch.org/faq

If you make money off of the packager, you are encouraged to [donate to us and the projects we rely upon](/donate). ❤️
4 changes: 2 additions & 2 deletions docs/website/4.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_table_of_contents: true

# Regarding Scratch Terms of Use Section 4.4

Some people have noticed that [Scratch's Terms of Use](https://scratch.mit.edu/terms_of_use) includes this section:
Some people have noticed that [Scratch's Terms of Use](https://scratch.org/terms_of_use) includes this section:

> 4.4 You may only submit user-generated projects that were created with (1) the Scratch website editor or (2) an unmodified copy of the Scratch editor compiled from the source code described in Section 5.3. You may not upload any projects that were created, by you or by anyone else, with a modified version of the Scratch editor.

Expand All @@ -18,7 +18,7 @@ Some people have noticed that [Scratch's Terms of Use](https://scratch.mit.edu/t

The exact wording of Section 5.3 is also worth noting:

> 5.3 The source code for Scratch 1.4 is available for download and subject to the copyright notice as indicated on the [Scratch FAQ](https://scratch.mit.edu/faq) page.
> 5.3 The source code for Scratch 1.4 is available for download and subject to the copyright notice as indicated on the [Scratch FAQ](https://scratch.org/faq) page.

Note the "Scratch 1.4" part — Scratch 1.4 was released in 2009. Interpret that however you want.

Expand Down
2 changes: 1 addition & 1 deletion docs/website/cloud-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Some things to keep in mind:
Connecting to our servers using bots and other custom clients is acceptable, within reason. We have some guidelines that we expect bot developers to follow:

* When using custom project IDs, don't use random numbers. Project IDs aren't contrained to numbers, so use text that lets us verify that your use is legitimate. For example, `example.com/my-project` is a lot more useful than `3498394834`. **If we see excessive cloud variable traffic to a numerical project ID that corresponds to an empty Scratch project, we may disable variables for that project.**
* Bots must set a proper `User-Agent` header. Include something like a Scratch username, GitHub repository, website, etc. so we can learn more about your bot. Cloud variable libraries should set a default User-Agent with generic library information and provide an API for library users to add their own contact information (ideally, make using this API mandatory). An example User-Agent would be `foo-client/1.0.0 ExampleBot/4.2 scratch.mit.edu/users/TestMuffin`. Pretending to be a web browser is not okay and is trivial to detect. **We will very likely start blocking bots without a valid User-Agent in the near future.**
* Bots must set a proper `User-Agent` header. Include something like a Scratch username, GitHub repository, website, etc. so we can learn more about your bot. Cloud variable libraries should set a default User-Agent with generic library information and provide an API for library users to add their own contact information (ideally, make using this API mandatory). An example User-Agent would be `foo-client/1.0.0 ExampleBot/4.2 scratch.org/users/TestMuffin`. Pretending to be a web browser is not okay and is trivial to detect. **We will very likely start blocking bots without a valid User-Agent in the near future.**
* Remember that a WebSocket is a bi-directional pipe, not a single-use HTTP request. If you need to read variables as they change, open exactly one WebSocket connection and let the server send updates as they happen. Once a WebSocket is no longer needed, close it. If you only want to read changes on intervals of several minutes or more, it would be better to open a WebSocket, wait to receive any variables, then close the connection. **We will very likely start blocking bots that constantly open and close many connections or that open simultaneous connections to the same project.**
* Bots must not send more than 10 cloud variable updates per second. It is server-side throttled at that point; sending more just wastes bandwidth. **We may start blocking bots that attempt to set variables too fast.**
* In order to reduce CPU and network usage, the server batches multiple cloud variable updates to send as a group. The server doesn't promise that it will send each variable update in the same order as they were received or that it won't skip some updates that were replaced by more recent values.
Expand Down
2 changes: 1 addition & 1 deletion docs/website/donate.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ hide_table_of_contents: true

The TurboWarp project now accepts donations on GitHub https://github.com/sponsors/GarboMuffin and other places https://muffin.ink/donate

You should also donate to Scratch: https://scratch.mit.edu/donate
You should also donate to Scratch: https://scratch.org/donate

Thank you! ❤️
2 changes: 1 addition & 1 deletion docs/website/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ TurboWarp uses a *compiler* to while Scratch uses an *interpreter*. This allows

export const Test = ({name, id, scratch, tw}) => (
<tr>
<td><a href={`https://scratch.mit.edu/projects/${id}/`}>{name}</a></td>
<td><a href={`https://scratch.org/projects/${id}/`}>{name}</a></td>
<td>{scratch}</td>
<td>{tw}</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion docs/website/scratch-accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_table_of_contents: true

# Scratch Accounts & TurboWarp

While you can't sign in to your Scratch account on TurboWarp (any website other than scratch.mit.edu that asks you for your Scratch password is a SCAM -- no exceptions), you can still run projects without sharing them, upload projects to Scratch, and use your own username.
While you can't sign in to your Scratch account on TurboWarp (any website other than scratch.org that asks you for your Scratch password is a SCAM -- no exceptions), you can still run projects without sharing them, upload projects to Scratch, and use your own username.

**To run a project made in Scratch using TurboWarp without sharing it**: Use File > Save to your computer in the Scratch editor to save the project to a file on your computer, and use select that file using File > Load from your computer in TurboWarp.

Expand Down
2 changes: 1 addition & 1 deletion docs/website/settings/custom-fps.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ When running at 30 FPS (as Scratch typically does), this script will run 30 time
To make projects that are compatible with custom framerates, you should use techniques such as delta time:

- https://en.wikipedia.org/wiki/Delta_timing
- https://scratch.mit.edu/projects/487694716/ (Scratch example)
- https://scratch.org/projects/487694716/ (Scratch example)

These techniques may require significant changes to your project.
2 changes: 1 addition & 1 deletion docs/website/settings/custom-stage-size.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Most projects will not work properly with custom stage size.

640x360 will make a widescreen 16:9 stage. Using higher resolutions such as 1280x720, 1920x1080, or larger is technically possible, but we recommend using a lower resolution with the same aspect ratio and allowing fullscreen mode to upscale it to the user's display (remember that some displays might not even fit such large stages!).

Projects can detect the stage size using methods such as https://scratch.mit.edu/projects/588493413/
Projects can detect the stage size using methods such as https://scratch.org/projects/588493413/
2 changes: 1 addition & 1 deletion docs/website/settings/high-quality-pen.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Not all projects will look better with high quality pen enabled.
</tbody>
</table>

Project pictured: https://scratch.mit.edu/projects/437594584/ with seed 803258.
Project pictured: https://scratch.org/projects/437594584/ with seed 803258.
2 changes: 1 addition & 1 deletion docs/website/turbowarp-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ NEW: TurboWarp now supports unsandboxed extensions which add new blocks! https:/

![is compiled?](./assets/is-compiled.svg)

See https://scratch.mit.edu/projects/414716080/
See https://scratch.org/projects/414716080/

These blocks are "compatible" with Scratch because they're actually just modified argument reporters.

Expand Down
10 changes: 5 additions & 5 deletions docs/website/unshared-projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Unshared projects can no longer be opened on TurboWarp, forkphorus, and other th
This page answers most of the questions people have and lists some workarounds. Please read it in full before discussing these changes with other people to avoid misinformation.

:::warning
ANY website other than scratch.mit.edu that asks for your Scratch password is a SCAM, even if it supposedly lets you share your unshared projects with other users. You WILL have your account stolen and projects deleted. There are NO EXCEPTIONS to this rule.
ANY website other than scratch.org that asks for your Scratch password is a SCAM, even if it supposedly lets you share your unshared projects with other users. You WILL have your account stolen and projects deleted. There are NO EXCEPTIONS to this rule.
:::

## What happened {#what-happened}
Expand Down Expand Up @@ -45,14 +45,14 @@ We've always had the stance that if people want unshared projects to actually be

This section is for people developing third-party Scratch-related tools.

The new procedure to download projects is to first fetch "project_token" field from `https://api.scratch.mit.edu/projects/ID` then use that to generate the URL `https://projects.scratch.mit.edu/ID?token=TOKEN`
The new procedure to download projects is to first fetch "project_token" field from `https://scratch-api.scratch.org/projects/ID` then use that to generate the URL `https://scratch-projects.scratch.org/ID?token=TOKEN`

If you're using JavaScript, here's some sample code to get you started that will work in web browsers. If your code is running server-side (eg. Node.js), you should replace `https://trampoline.turbowarp.org/api/projects/` with `https://api.scratch.mit.edu/projects/` as servers are immune to [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing). We make no guarantees about the uptime of trampoline.turbowarp.org; use at your own risk. You may also be interested in [sb-downloader](https://github.com/forkphorus/sb-downloader) (includes easy API) for a complete full project downloader.
If you're using JavaScript, here's some sample code to get you started that will work in web browsers. If your code is running server-side (eg. Node.js), you should replace `https://trampoline.turbowarp.org/api/projects/` with `https://scratch-api.scratch.org/projects/` as servers are immune to [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing). We make no guarantees about the uptime of trampoline.turbowarp.org; use at your own risk. You may also be interested in [sb-downloader](https://github.com/forkphorus/sb-downloader) (includes easy API) for a complete full project downloader.

```js
const getProjectMetadata = async (projectId) => {
// IF IN A WEB BROWSER, you need to use a service like trampoline.turbowarp.org to access the Scratch API.
// IF IN NODE.JS, you should use https://api.scratch.mit.edu/projects/${projectId} directly instead.
// IF IN NODE.JS, you should use https://scratch-api.scratch.org/projects/${projectId} directly instead.
const response = await fetch(`https://trampoline.turbowarp.org/api/projects/${projectId}`);
if (response.status === 404) {
throw new Error('The project is unshared or does not exist');
Expand All @@ -67,7 +67,7 @@ const getProjectMetadata = async (projectId) => {
const getProjectData = async (projectId) => {
const metadata = await getProjectMetadata(projectId);
const token = metadata.project_token;
const response = await fetch(`https://projects.scratch.mit.edu/${projectId}?token=${token}`);
const response = await fetch(`https://scratch-projects.scratch.org/${projectId}?token=${token}`);
if (!response.ok) {
throw new Error(`HTTP error ${response.status} fetching project data`);
}
Expand Down