Discuss Scratch

IronBill05
Scratcher
100+ posts

HTML Blocks - TurboWarp Extension - Run JavaScript code!!!

IronBill05 wrote:

Mahdir2111 wrote:

IronBill05 wrote:

Hey everyone! I just remade the extension with an IIFE (immediately invoked function expression) in mind, so it works a bit better!

Stay on the lookout for future updates!
I tried to add it but it doesn't work

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.
(some random unnecessary post I made)

Last edited by IronBill05 (June 1, 2024 14:13:41)

IronBill05
Scratcher
100+ posts

HTML Blocks - TurboWarp Extension - Run JavaScript code!!!

Bump!
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:
javascript:vm.addAddonBlock({callback:({x})=>{eval(x);},arguments:['x'],displayName:'eval %s'});
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.
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!!!

IronBill05 wrote:

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:
javascript:vm.addAddonBlock({callback:({x})=>{eval(x);},arguments:['x'],displayName:'eval %s'});
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.
it says undefined. looks like a custom block
IronBill05
Scratcher
100+ posts

HTML Blocks - TurboWarp Extension - Run JavaScript code!!!

Scratch-Proof wrote:

IronBill05 wrote:

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:
javascript:vm.addAddonBlock({callback:({x})=>{eval(x);},arguments:['x'],displayName:'eval %s'});
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.
it says undefined. looks like a custom block
It could have been broken by an update, I'll see what I can do
IronBill05
Scratcher
100+ posts

HTML Blocks - TurboWarp Extension - Run JavaScript code!!!

Scratch-Proof wrote:

IronBill05 wrote:

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:
javascript:vm.addAddonBlock({callback:({x})=>{eval(x);},arguments:['x'],displayName:'eval %s'});
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.
it says undefined. looks like a custom block
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.

Powered by DjangoBB