Discuss Scratch
- Discussion Forums
- » Developing Scratch Extensions
- » HTML Blocks - TurboWarp Extension - Run JavaScript code!!!
- IronBill05
-
Scratcher
100+ posts
HTML Blocks - TurboWarp Extension - Run JavaScript code!!!
(some random unnecessary post I made)Hey everyone! I just remade the extension with an IIFE (immediately invoked function expression) in mind, so it works a bit better!I tried to add it but it doesn't work
Stay on the lookout for future updates!
Maybe try downloading it as a .js file? You can do it by pasting it in notepad or whatever text editor you have, then saving is as a javascript file (add .js to the end of the file name) and then load the new file into turbowarp as an extension.
Last edited by IronBill05 (June 1, 2024 14:13:41)
- IronBill05
-
Scratcher
100+ posts
HTML Blocks - TurboWarp Extension - Run JavaScript code!!!
Hey! Here is a bookmarklet that adds an “eval” block to turbowarp that runs JavaScript code!
Here is the link so you can save it to your browser:
Just make a new bookmark, set the URL to the code above, and save it!
Oh, and if the block does not show up, just switch from a sprite to the backdrop and it will automatically be displayed!
Also, you need the “addon blocks” on for it to work.
Here is the link so you can save it to your browser:
javascript:vm.addAddonBlock({callback:({x})=>{eval(x);},arguments:['x'],displayName:'eval %s'});Oh, and if the block does not show up, just switch from a sprite to the backdrop and it will automatically be displayed!
Also, you need the “addon blocks” on for it to work.
- o97doge
-
Scratcher
500+ posts
HTML Blocks - TurboWarp Extension - Run JavaScript code!!!
Use “new Function('code')” instead of eval, it's faster.
Last edited by o97doge (Aug. 1, 2024 00:01:54)
- IronBill05
-
Scratcher
100+ posts
HTML Blocks - TurboWarp Extension - Run JavaScript code!!!
bump… actually, i'm not sure 

- Scratch-Proof
-
Scratcher
4 posts
HTML Blocks - TurboWarp Extension - Run JavaScript code!!!
Hey! Here is a bookmarklet that adds an “eval” block to turbowarp that runs JavaScript code!it says undefined. looks like a custom block
Here is the link so you can save it to your browser:Just make a new bookmark, set the URL to the code above, and save it!javascript:vm.addAddonBlock({callback:({x})=>{eval(x);},arguments:['x'],displayName:'eval %s'});
Oh, and if the block does not show up, just switch from a sprite to the backdrop and it will automatically be displayed!
Also, you need the “addon blocks” on for it to work.
- IronBill05
-
Scratcher
100+ posts
HTML Blocks - TurboWarp Extension - Run JavaScript code!!!
It could have been broken by an update, I'll see what I can doHey! Here is a bookmarklet that adds an “eval” block to turbowarp that runs JavaScript code!it says undefined. looks like a custom block
Here is the link so you can save it to your browser:Just make a new bookmark, set the URL to the code above, and save it!javascript:vm.addAddonBlock({callback:({x})=>{eval(x);},arguments:['x'],displayName:'eval %s'});
Oh, and if the block does not show up, just switch from a sprite to the backdrop and it will automatically be displayed!
Also, you need the “addon blocks” on for it to work.
- IronBill05
-
Scratcher
100+ posts
HTML Blocks - TurboWarp Extension - Run JavaScript code!!!
You need the debugger addon for it to work; otherwise it cannot add the block. Just make sure the “Debugger” toggle is enabled on the addons page of TurboWarp.Hey! Here is a bookmarklet that adds an “eval” block to turbowarp that runs JavaScript code!it says undefined. looks like a custom block
Here is the link so you can save it to your browser:Just make a new bookmark, set the URL to the code above, and save it!javascript:vm.addAddonBlock({callback:({x})=>{eval(x);},arguments:['x'],displayName:'eval %s'});
Oh, and if the block does not show up, just switch from a sprite to the backdrop and it will automatically be displayed!
Also, you need the “addon blocks” on for it to work.
- Discussion Forums
- » Developing Scratch Extensions
-
» HTML Blocks - TurboWarp Extension - Run JavaScript code!!!



