From 30ca4dbce69d860e80c8c751f0e33541c13cb4f1 Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Wed, 1 Mar 2017 14:55:35 -0500 Subject: [PATCH] Fix no-var warnings --- src/lib/blocks.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/lib/blocks.js b/src/lib/blocks.js index 0df46d9b4..d418153a4 100644 --- a/src/lib/blocks.js +++ b/src/lib/blocks.js @@ -36,10 +36,10 @@ module.exports = function (vm) { const backdropsMenu = function () { return vm.runtime.targets[0].sprite.costumes.map(costume => [costume.name, costume.name]); }; - + const spriteMenu = function () { - var sprites = []; - for (var targetId in vm.runtime.targets) { + const sprites = []; + for (const targetId in vm.runtime.targets) { if (!vm.runtime.targets.hasOwnProperty(targetId)) continue; if (vm.runtime.targets[targetId].isOriginal) { if (!vm.runtime.targets[targetId].isStage) { @@ -56,11 +56,11 @@ module.exports = function (vm) { const soundColors = ScratchBlocks.Colours.sounds; const looksColors = ScratchBlocks.Colours.looks; - + const motionColors = ScratchBlocks.Colours.motion; - + const sensingColors = ScratchBlocks.Colours.sensing; - + const controlColors = ScratchBlocks.Colours.control; ScratchBlocks.Blocks.sound_sounds_menu.init = function () { @@ -77,14 +77,14 @@ module.exports = function (vm) { const json = jsonForMenuBlock('BACKDROP', backdropsMenu, looksColors, []); this.jsonInit(json); }; - + ScratchBlocks.Blocks.motion_pointtowards_menu.init = function () { const json = jsonForMenuBlock('TOWARDS', spriteMenu, motionColors, [ ['mouse-pointer', '_mouse_'] ]); this.jsonInit(json); }; - + ScratchBlocks.Blocks.motion_goto_menu.init = function () { const json = jsonForMenuBlock('TO', spriteMenu, motionColors, [ ['mouse-pointer', '_mouse_'], @@ -92,28 +92,28 @@ module.exports = function (vm) { ]); this.jsonInit(json); }; - + ScratchBlocks.Blocks.sensing_of_object_menu.init = function () { const json = jsonForMenuBlock('OBJECT', spriteMenu, sensingColors, [ ['Stage', '_stage_'] ]); this.jsonInit(json); }; - + ScratchBlocks.Blocks.sensing_videoonmenutwo.init = function () { const json = jsonForMenuBlock('VIDEOONMENU2', spriteMenu, sensingColors, [ ['stage', 'STAGE'] ]); this.jsonInit(json); }; - + ScratchBlocks.Blocks.sensing_distancetomenu.init = function () { const json = jsonForMenuBlock('DISTANCETOMENU', spriteMenu, sensingColors, [ ['mouse-pointer', '_mouse_'] ]); this.jsonInit(json); }; - + ScratchBlocks.Blocks.sensing_touchingobjectmenu.init = function () { const json = jsonForMenuBlock('TOUCHINGOBJECTMENU', spriteMenu, sensingColors, [ ['mouse-pointer', '_mouse_'], @@ -121,7 +121,7 @@ module.exports = function (vm) { ]); this.jsonInit(json); }; - + ScratchBlocks.Blocks.control_create_clone_of_menu.init = function () { const json = jsonForMenuBlock('CLONE_OPTION', spriteMenu, controlColors, [ ['myself', '_myself_']