File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 11// If a project uses an extension but does not specify a URL, it will default to
22// the URLs given here, if it exists. This is useful for compatibility with other mods.
33
4- const defaults = new Map ( ) ;
4+ const defaults = {
5+ // Box2D (`griffpatch`) is not listed here because our extension is not actually
6+ // compatible with the original version due to fields vs inputs.
57
6- // Box2D (`griffpatch`) is not listed here because our extension is not actually
7- // compatible with the original version due to fields vs inputs.
8+ // Scratch Lab Animated Text - https://lab.scratch.mit.edu/text/
9+ text : 'https://extensions.turbowarp.org/lab/text.js' ,
810
9- // Scratch Lab Animated Text - https://lab.scratch.mit.edu/text/
10- defaults . set ( 'text' , 'https://extensions.turbowarp.org/lab/text .js' ) ;
11+ // Turboloader's AudioStream
12+ audiostr : 'https://extensions.turbowarp.org/turboloader/audiostream .js' ,
1113
12- // Turboloader's AudioStream
13- defaults . set ( 'audiostr' , 'https://extensions.turbowarp.org/turboloader/audiostream.js' ) ;
14+ // https://scratch.mit.edu/discuss/topic/842592/
15+ faceSensing : 'https://extensions.turbowarp.org/lab/face-sensing.js'
16+ } ;
1417
1518module . exports = defaults ;
Original file line number Diff line number Diff line change @@ -779,7 +779,10 @@ class VirtualMachine extends EventEmitter {
779779 this . extensionManager . loadExtensionIdSync ( extensionID ) ;
780780 } else {
781781 // Custom extension
782- const url = extensionURLs . get ( extensionID ) || defaultExtensionURLs . get ( extensionID ) ;
782+ let url = extensionURLs . get ( extensionID ) ;
783+ if ( ! url && Object . prototype . hasOwnProperty . call ( defaultExtensionURLs , extensionID ) ) {
784+ url = defaultExtensionURLs [ extensionID ] ;
785+ }
783786 if ( ! url ) {
784787 throw new Error ( `Unknown extension: ${ extensionID } ` ) ;
785788 }
You can’t perform that action at this time.
0 commit comments