Thomas Weber
c3b60f6fb6
Add Scratch.download API
2024-12-22 17:46:17 -06:00
Thomas Weber
fdd954c012
Add URL argument to Scratch.canDownload
...
This lets us filter out javascript: URLs
2024-12-22 17:46:09 -06:00
Thomas Weber
1a578aa44e
Add canDownload API
...
https://github.com/TurboWarp/scratch-gui/issues/969
2024-12-22 11:51:26 -06:00
Muffin
9e6993de27
Add restricted fonts and case insensitivity to font manager ( #231 )
2024-11-02 21:39:44 -05:00
Muffin
99ff662f7f
Don't emit STAGE_SIZE_CHANGED if stage size didn't change
...
and also fix the other STAGE_SIZE_CHANGED event test to
actually test that it is being fired when there is a change
2024-07-31 15:16:44 -05:00
Muffin
d69256aa2d
Replace jszip with @turbowarp/jszip
2024-05-19 21:58:36 -05:00
KyleKart and Muffin
ce04eafec0
Add boolean argument support to ScratchX compatibility layer ( #208 )
...
Co-authored-by: Muffin <muffin@muffin.ink >
2024-05-09 00:46:18 -05:00
Muffin
11eec6604d
Allow scratch-gui (and others) to extend unsandboxed extension APIs
2024-04-06 16:01:31 -05:00
GarboMuffin
20f25f252c
interpreter: Do not re-evaluate procedure arguments after stop this script or return ( #202 )
...
"stop this script" and "return" would previously cause all the procedure
arguments to be re-evaluated and then discarded. In vanilla Scratch the
worst case is a performance penalty, but with our custom reporters it
can cause infinite loops.
Fixes https://github.com/TurboWarp/scratch-vm/issues/201
2024-03-30 17:53:13 -05:00
Muffin
9657efb1d4
Shorten Base64Util test cases
...
1000000 items is very slow; the tests take about 4 seconds on my machine.
2024-02-10 01:42:16 -06:00
tpsnt and Muffin
845c374f72
Fix WeDo2.send sends empty message ( #192 )
...
* Fix WeDo2.send sends empty message
WeDo2.send invokes Base64Util.uint8ArrayToBase64(message). However message.arrayLength === undefined. This causes Base64Util.uint8ArrayToBase64 always returning empty string ''.
* Move the fix to base64-util instead
---------
Co-authored-by: Muffin <muffin@mailbox.org >
2024-02-10 01:40:36 -06:00
Muffin
96225163c1
Fix tests in Node 21 and later
2024-02-02 21:25:58 -06:00
Muffin
9511cc4000
Remove note/drum concurrency limit when misc limits are removed
2024-01-13 21:58:18 -06:00
Muffin
b7e9016c56
Apply new TurboWarp/scratch-blocks extensions
2024-01-11 02:41:28 -06:00
Muffin
088b0c1780
Experiment with staticFetch to improve reliability of large data: URLs
2024-01-09 03:45:27 -06:00
GarboMuffin
8297dd4cc9
Add native loading progress tracking ( #180 )
2024-01-03 00:56:54 -06:00
LilyMakesThings and Muffin
7f9c8f759c
Add per-block extensions and colors ( #177 )
...
Co-authored-by: Muffin <muffin@mailbox.org >
2023-12-31 02:24:31 -06:00
Cubester and Muffin
b27142a012
Allow removing loop icon using branchIconURI ( #176 )
...
Co-authored-by: Muffin <muffin@mailbox.org >
2023-12-31 01:32:22 -06:00
Muffin
c309c42894
Use media:// for default loop icon (requires scratch-blocks change)
...
They have always been subtly broken, but the high contrast changes finally the old path for good.
https://github.com/TurboWarp/scratch-blocks/commit/7413542d3731b58381e05fddf6913fbc494f9cd9
2023-12-31 00:24:20 -06:00
Muffin
051c310ff3
merge-upstream: Fix broken test
2023-12-25 14:54:21 -06:00
Muffin
9f26069ad6
merge-upstream: Fix ESLint errors
2023-12-22 17:56:40 -06:00
Muffin
5d52268ace
merge-upstream: Fix test errors
2023-12-22 17:49:05 -06:00
Muffin
81a0382e0f
merge-upstream: initial merge of upstream/develop
...
installs & compiles but has test errors
aside from expected merge conflicts, notable changes from upstream:
- removed husky, commitlint, etc.
- removed semantic-release etc.
2023-12-22 17:25:21 -06:00
Cubester and Muffin
bd0cf91d85
Add branchIconURI ( #174 )
...
Co-authored-by: Muffin <muffin@mailbox.org >
2023-12-22 16:47:48 -06:00
Muffin
24b6036825
Add Scratch.translate.language extension API
...
Requested by https://github.com/TurboWarp/extensions/pull/1172
2023-12-21 00:20:36 -06:00
Muffin
d386082d5b
Allow BOOLEAN blocks to be monitors
...
This will cause issues if the booleans have side-effects.
Closes https://github.com/TurboWarp/extensions/issues/201
2023-08-28 14:13:49 -05:00
Muffin
56a1b141e1
Allow Scratch.fetch() to follow redirects
2023-08-25 16:30:03 -05:00
Muffin
621ccefcb0
Add SecurityManager.canEmbed()
2023-08-24 15:40:27 -05:00
Muffin
6f335eccb4
Add SecurityManager.rewriteExtensionURL()
2023-08-24 15:40:20 -05:00
Muffin
6399562b90
Revert running unsandboxed extensions with fetch() and new AsyncFunction instead of <script>
...
It causes other issues:
- It *will* break projects
- Stack traces from errors in extensions are unusable
- We do not even get some of the originally intended benefits like parallel loading
2023-08-22 11:24:20 -05:00
GarboMuffin
9caca1c510
Merge pull request #157 from TurboWarp/modernize-loading
...
Use fetch() and AsyncFunction instead of `<script>` for unsandboxed extensions
2023-08-22 10:48:54 -05:00
Muffin
683620994f
Fix tests
2023-08-22 10:43:04 -05:00
Muffin
55cda8242c
Run unsandboxed extensions with fetch() and new AsyncFunction instead of <script>
...
Benefits:
- IIFE no longer needed
- Extensions can await
- Better error messages
Downsides:
- CORS now required to load extensions
2023-08-22 10:00:36 -05:00
Muffin
b23fb1e8be
Refactor ScratchX compatibility layer
2023-08-16 16:39:09 -05:00
Muffin
b9e84b7db2
Implement custom font manager
2023-08-16 10:34:06 -05:00
GarboMuffin
fbc62badf6
Merge pull request #150 from TurboWarp/return
...
Allow custom blocks to return values - VM part
2023-07-29 09:56:57 -05:00
GarboMuffin
9329427fb5
Export the internal copy of JSZip for extensions
2023-07-16 21:02:38 -05:00
GarboMuffin
5ff2a56bdc
Add Scratch.canGeolocate() extension API
2023-07-16 09:38:46 -05:00
GarboMuffin
f033067b6f
Non-warp recursion should yield in interpreter
...
Matches normal procedure blocks. Already worked in compiler.
2023-07-14 19:28:13 -05:00
GarboMuffin
a515991c37
Return original message if translation request fails
...
For games that put their entire interface through translate blocks, this
allows them to be more usable when no internet connection is present.
Has convenient side effect of breaking some online detectors.
2023-07-07 19:49:11 -05:00
GarboMuffin
19c9e8f591
Fix Scratch.translate in unsandboxed custom extensions
2023-05-29 01:16:04 -05:00
GarboMuffin
21915f4565
Export some internal classes for extensions
...
This is similar to what we do in TW/scratch-render
2023-05-28 22:48:38 -05:00
GarboMuffin
ea81f29955
Always force noreferrer when opening new windows
2023-05-26 22:32:03 -05:00
GarboMuffin
227dec235a
Add canRecordAudio, canRecordVideo, canReadClipboard, canNotify
2023-05-26 20:17:09 -05:00
GarboMuffin
398892c6f2
Extension L10N - VM part ( #133 )
...
Sandboxed extensions will use navigator.language
Unsandboxed extensions will use the language set by setLocale
2023-05-18 00:00:59 -05:00
GarboMuffin
c73f821abf
Add ArgumentType.COSTUME and ArgumentType.SOUND
2023-03-25 14:33:57 -05:00
GarboMuffin
1ab111b7ca
Fix using empty defaultValue for NUMBER arguments
...
Closes https://github.com/TurboWarp/extensions/issues/119
2023-03-25 13:54:44 -05:00
GarboMuffin
47adea8107
Add Scratch.fetch, Scratch.openWindow, and Scratch.redirect stubs in sandboxed extensions
...
Also includes the appropriate can[Fetch|OpenWindow|Redirect] methods.
Fetching is always allowed. The other methods are always rejected.
The Worker-based sandbox does not have a window.open method and the
iframe-based sandbox has a feature policy that should prevent them from
opening windows already.
2023-03-18 13:15:05 -05:00
GarboMuffin
cd8f28fbba
Restore test that checks compressed IDs do not conflict with uncompressed
2023-02-17 18:19:02 -06:00
GarboMuffin
750cd7adb1
Fix sb3 compression breaking execution order at random
...
The bug was that property keys that look like array indexes are always
enumerated by JS before other keys regardless of creation time. For now,
we will avoid using numbers when compressing projects.
This does negligibly increase the size of project.json.
Appel v1.4 went from 2257234 to 2260628 bytes, a 0.15% increase.
2023-02-17 17:42:09 -06:00