Does anybody have a Javascript extension? (Personal Use) #627
-
It would be really useful for me to use in my projects! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Go on PenguinMod at penguinmod.site then look at the extensions, go to Programming Languages category, and there it is! |
Beta Was this translation helpful? Give feedback.
-
#570, although it's in development and requires clicking a button in the editor before using it (unless the project is packaged). |
Beta Was this translation helpful? Give feedback.
-
I wrote this up just now in this post!! just copy the below code into turbowarp or make ur own file (function (Scratch) {
'use strict';
class JavaScriptConsole {
getInfo() {
return {
id: 'javascriptConsole',
name: 'JavaScript Console',
blocks: [
{
opcode: 'runJavaScriptCode',
blockType: Scratch.BlockType.COMMAND,
text: 'Run JavaScript code [code]',
arguments: {
code: {
type: Scratch.ArgumentType.STRING,
defaultValue: 'console.log("Hello, World!");'
}
}
}
]
};
}
runJavaScriptCode(args) {
const code = args.code || '';
try {
eval(code);
} catch (error) {
console.error('Error executing JavaScript code:', error);
}
}
}
Scratch.extensions.register(new JavaScriptConsole());
})(Scratch); GG EZ |
Beta Was this translation helpful? Give feedback.
I wrote this up just now in this post!!
ur welcome!
just copy the below code into turbowarp or make ur own file
REMEMBER TO LOAD UNSANDBOXED