Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ScratchBlocks.Blocks.sensing_touchingobjectmenu.init = function () {
const mouse = ScratchBlocks.ScratchMsgs.translate('SENSING_TOUCHINGOBJECT_POINTER', 'mouse-pointer');
const edge = ScratchBlocks.ScratchMsgs.translate('SENSING_TOUCHINGOBJECT_EDGE', 'edge');
const json = jsonForMenuBlock('TOUCHINGOBJECTMENU', spriteMenu, sensingColors, [
[mouse, '_mouse_'],
[edge, '_edge_']
]);
this.jsonInit(json);
};
ScratchBlocks.Blocks.control_create_clone_of_menu.init = function () {
const json = jsonForMenuBlock('CLONE_OPTION', cloneMenu, controlColors, []);
this.jsonInit(json);
};
ScratchBlocks.VerticalFlyout.getCheckboxState = function (blockId) {
const monitoredBlock = vm.runtime.monitorBlocks._blocks[blockId];
return monitoredBlock ? monitoredBlock.isMonitored : false;
};
ScratchBlocks.FlyoutExtensionCategoryHeader.getExtensionState = function (extensionId) {
if (vm.getPeripheralIsConnected(extensionId)) {
return ScratchBlocks.StatusButtonState.READY;
}
return ScratchBlocks.StatusButtonState.NOT_READY;
};
ScratchBlocks.FieldNote.playNote_ = function (noteNum, extensionId) {
vm.runtime.emit('PLAY_NOTE', noteNum, extensionId);
};
// Use a collator's compare instead of localeCompare which internally