Skip to content

Instantly share code, notes, and snippets.

@csf30816
Last active July 12, 2016 20:09
Show Gist options
  • Save csf30816/7e6c6bfa5598c41b000ca3e7ae5e5021 to your computer and use it in GitHub Desktop.
Save csf30816/7e6c6bfa5598c41b000ca3e7ae5e5021 to your computer and use it in GitHub Desktop.
(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'};
};
ext.get = function(v) {
return vars[v];
};
// Block and block menu descriptions
var descriptor = {
blocks: [
// Block type, block name, function name, param1 default value, param2 default value
['r', '%m.var', 'get', "Variable"],
]
};
// Register the extension
ScratchExtensions.register('Sample extension', descriptor, ext);
})({});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment