Last active
July 12, 2016 20:09
-
-
Save csf30816/7e6c6bfa5598c41b000ca3e7ae5e5021 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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