Replies: 7 comments 4 replies
-
I succeeded in creating my custom extension but now I need it automatically loaded at startup as I can't ask my students to load the extension in the offline Turbowarp desktop (we use the desktop version as we need to avoid not to be able to teach labs when internet is down) every time they open Turbowarp. Is there any chance that the load-extensions addon will be updated by the end of January when I'm starting my lessons? |
Beta Was this translation helpful? Give feedback.
-
You might be able to use a custom TW Desktop userscript to manually load the extension (using vm APIs, like EDIT: I did it: autoload_userscript.zip (I haven't throughly tested it, but it seems to work fine, and projects saved don't contain the foreverif extension in them. I've included your foreverif extension by default, but you can use other extensions too by converting them into a data URL and putting them in the userscript file.) |
Beta Was this translation helpful? Give feedback.
-
That is a very interesting feature. And it almost worked. I copied your userscript.js file to my C:\Users\stefanofederici\AppData\Roaming\turbowarp-desktop folder and the "forever if" block appeared in the sidebar. But when I drag it in the script area it doesn't work. I also checked that I can load the pong.sb3 project (it looks fine) but when I run it it doesn't work either. |
Beta Was this translation helpful? Give feedback.
-
I guess there is something more. I was testing my extension using https://turbowarp.org/editor?extension=http://localhost:8000/sfederici/foreverif.js and it perfectly works. Now that I'm using the offline desktop version, it doesn't work even if I load it by pasting the code of my custom extension in the "text" tab. Does the extension fully work for you either if you put the userscript.js file in the appdata folder or you paste the extension code in the "text" tab? If so, what SO are you using? Thanks for your help |
Beta Was this translation helpful? Give feedback.
-
I did find my older answer to this too: TurboWarp/scratch-gui#809 (comment) |
Beta Was this translation helpful? Give feedback.
-
Thanks, I had put this on hold and I had forgot your answer. As I need to load a custom extension that won't be in the official extension gallery, is the strategy of adding my custom estension code inside some official js/jsx file and then rebuild turbowarp a viable solution? |
Beta Was this translation helpful? Give feedback.
-
[I thought I had already asked that, but I couldn't find the discussion, so sorry if this is a duplicate]
Would it be possibe to update the "load-extensions" addon, so that one could have a custom extension automatically loaded at startup?
The ideal working would be the following one:
1- paste the extension code in the text tab of the "load custom extension" dialog
2- have the extension code exported when exporting the ScratchAddons settings
3- have the extension code imported and the extension added to the palette when importing the ScratchAddons settings
4- after the first import, have the extension automatically loaded in Turbowarp when one closes and restarts it
Beta Was this translation helpful? Give feedback.
All reactions