Discuss Scratch
- Discussion Forums
- » Developing Scratch Extensions
- » Umm, so how do you test your extension on ScratchX? xD #GitNewbie
- Rumanti
-
Scratcher
1000+ posts
Umm, so how do you test your extension on ScratchX? xD #GitNewbie
After failing with a Firefox extension millions years ago, I decided that I should start with something smaller first: Scratch extensions.
After re-learning some JavaScript and looking at sources of other Scratch extensions, I typed (and copy-pasted from documentations) what looked like a nice and valid code. (Note: Please do not judge and underestimate me by that code, I need to test some stuff before getting to the point!) I successfully set up my GitHub page that seems to work, and also pushed a crossdomain.xml.
But I don't understand the next steps said in the documentation. Confused, http://scratchx.org/?url=http://rumanti.github.io/repository/extension.js#scratch does not work D: So, how do I test my experimental extension on ScratchX? Thanks!
After re-learning some JavaScript and looking at sources of other Scratch extensions, I typed (and copy-pasted from documentations) what looked like a nice and valid code. (Note: Please do not judge and underestimate me by that code, I need to test some stuff before getting to the point!) I successfully set up my GitHub page that seems to work, and also pushed a crossdomain.xml.
But I don't understand the next steps said in the documentation. Confused, http://scratchx.org/?url=http://rumanti.github.io/repository/extension.js#scratch does not work D: So, how do I test my experimental extension on ScratchX? Thanks!
- Mrcomputer1
-
Scratcher
500+ posts
Umm, so how do you test your extension on ScratchX? xD #GitNewbie
Your link should be http://scratchx.org/?url=http://rumanti.github.io/extension.js#scratch
The link you have is for if the code is in a repository called repository.
Also you can right click the load experimental extension to select from file!
The link you have is for if the code is in a repository called repository.
Also you can right click the load experimental extension to select from file!
- Rumanti
-
Scratcher
1000+ posts
Umm, so how do you test your extension on ScratchX? xD #GitNewbie
Your link should be http://scratchx.org/?url=http://rumanti.github.io/extension.js#scratch
The link you have is for if the code is in a repository called repository.
Also you can right click the load experimental extension to select from file!
*sigh* my slice block doesn't appear. I guess there IS something wrong with my code. My browser kept crashing.
- Mrcomputer1
-
Scratcher
500+ posts
Umm, so how do you test your extension on ScratchX? xD #GitNewbie
I do know where you code is wrong. I can show you a working version of your code if you want.Your link should be http://scratchx.org/?url=http://rumanti.github.io/extension.js#scratch
The link you have is for if the code is in a repository called repository.
Also you can right click the load experimental extension to select from file!
*sigh* my slice block doesn't appear. I guess there IS something wrong with my code. My browser kept crashing.
- Rumanti
-
Scratcher
1000+ posts
Umm, so how do you test your extension on ScratchX? xD #GitNewbie
I do know where you code is wrong. I can show you a working version of your code if you want.Your link should be http://scratchx.org/?url=http://rumanti.github.io/extension.js#scratch
The link you have is for if the code is in a repository called repository.
Also you can right click the load experimental extension to select from file!
*sigh* my slice block doesn't appear. I guess there IS something wrong with my code. My browser kept crashing.
Yes, please. I haven't figured out what's wrong with the code. If you point out my mistake I might be able to be more sensitive to that problem in the future

- Mrcomputer1
-
Scratcher
500+ posts
Umm, so how do you test your extension on ScratchX? xD #GitNewbie
I do know where you code is wrong. I can show you a working version of your code if you want.Your link should be http://scratchx.org/?url=http://rumanti.github.io/extension.js#scratch
The link you have is for if the code is in a repository called repository.
Also you can right click the load experimental extension to select from file!
*sigh* my slice block doesn't appear. I guess there IS something wrong with my code. My browser kept crashing.
Yes, please. I haven't figured out what's wrong with the code. If you point out my mistake I might be able to be more sensitive to that problem in the future
(function(ext) { // Cleanup function when the extension is unloaded ext._shutdown = function() {}; // Status reporting code // Use this to report missing hardware, plugin or unsupported browser ext._getStatus = function() { return {status: 2, msg: 'Ready'}; }; // Slice block ext.slice = function(input, first, second) { return input.slice(first,second); //Error on this line: input[first:second] should be input.slice(first,second) }; //I don't think this ; is needed but when I was locating errors I put it here // Block and block menu descriptions var descriptor = { blocks: [ ['r', 'slice of %s from %n to %n', 'slice', 'hello', 1, 5] //Error on this line: slice should be 'slice' ] }; // Register the extension ScratchExtensions.register('Sample extension', descriptor, ext); })({});
Last edited by Mrcomputer1 (July 16, 2015 11:13:24)
- Rumanti
-
Scratcher
1000+ posts
Umm, so how do you test your extension on ScratchX? xD #GitNewbie
Wow, thanks! (very) The big mistake I made is that I refused my inner mind to use syntax highlighting and my Git client.
Again, thanks!
Again, thanks!- Mrcomputer1
-
Scratcher
500+ posts
Umm, so how do you test your extension on ScratchX? xD #GitNewbie
Wow, thanks! (very) The big mistake I made is that I refused my inner mind to use syntax highlighting and my Git client.Again, thanks!

- Discussion Forums
- » Developing Scratch Extensions
-
» Umm, so how do you test your extension on ScratchX? xD #GitNewbie

