Mobsya / thymio-scratchx

A ScratchX extension for Thymio
GNU Lesser General Public License v3.0
3 stars 11 forks source link

Use local extension #19

Closed stefangachter closed 5 years ago

stefangachter commented 5 years ago

Hi!

I would like to make a German version of Thymio ScratchX extension. Thus, I made fork started ScratchX with the local extension: http://scratchx.org/?file=“/Users/stefangachter/Documents/Sandbox/thymio-scratchx/thymio_extension_beginner.js”#scratch

However, the blocks are not visible in the GUI: スクリーンショット 2019-04-05 10 26 45

If I load the online version, the blocks are properly displayed: スクリーンショット 2019-04-05 10 29 12

Any idea, why local version is not working?

stefangachter commented 5 years ago

If I load the extension by right clicking "Load Experimental Extension" then not much ist reveal in the web inspector:

Function@[native code] loadLocalJS@http://scratchx.org/scratch_extensions/scratch_ext.js:80:26 global code

stefangachter commented 5 years ago

I tried to load the extension by "Load Experimental Extension" then entering the URL from my github fork, but loading failed with error message:

Did not load script at 'https://raw.githubusercontent.com/stefangachter/thymio-scratchx/gh-pages/thymio_extension_beginner.js' because non script MIME types are not allowed when 'X-Content-Type: nosniff' is given.

stefangachter commented 5 years ago

Ok, I could load the extension from github using a cdn:

https://cdn.jsdelivr.net/gh/stefangachter/thymio-scratchx@gh-pages/thymio_extension_beginner.js

Note: Safari disabled private browsing.

スクリーンショット 2019-04-05 12 17 31

Learnt something today. Still, would be nice to load from local. Would make development easier.

stefangachter commented 5 years ago

I did extend the thymio_extension_beginner.js with de: section for blocks and menus and pushed the changes to github. However, changes are not immediately available with cdn. If someone can explain how to speed up the process, would be helpful.