From 9b380c33e39113f2f844faa8cf9793668c791844 Mon Sep 17 00:00:00 2001 From: Bas van Schaik Date: Thu, 16 Nov 2017 15:42:02 +0000 Subject: [PATCH 1/4] fix lgtm.com alert in viz.js: duplicate property https://lgtm.com/projects/g/google/bottery/snapshot/84eb50a08253ebc2e531730521d1f27d9b9fb686/files/js/viz.js#x9ff8fff9e12f6656:1 --- js/viz.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/js/viz.js b/js/viz.js index dc2caff..c67fd72 100644 --- a/js/viz.js +++ b/js/viz.js @@ -169,11 +169,8 @@ var viz = { 'color': 'rgb(255, 255, 255)', 'background-color': '#666', 'text-valign': 'center', - 'shape': "roundrectangle", 'label': 'data(label)', - 'shape': "ellipse", - 'width': 20, 'height': 20 } From dc2958487236c40565e769c2ff1c5bdc484046e5 Mon Sep 17 00:00:00 2001 From: Bas van Schaik Date: Thu, 16 Nov 2017 15:43:39 +0000 Subject: [PATCH 2/4] fix lgtm.com alert: duplicate property 'loadmap' https://lgtm.com/projects/g/google/bottery/snapshot/84eb50a08253ebc2e531730521d1f27d9b9fb686/files/js/io.js#x1a7acd6235da44f4:1 ('loadMap' was defined twice with two different function signatures. I deleted the empty one) --- js/io.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/js/io.js b/js/io.js index e5114d0..96ff5e5 100644 --- a/js/io.js +++ b/js/io.js @@ -43,11 +43,7 @@ var io = { saveData: function(map, key, val) { localStorage.setItem("data-" + map.settings.id + "-" + key, val); }, - - loadMap: function(id) { - - }, - + textToSpeech: function(text, onFinish, onFinishEach) { From f1f2032b4d8ea287ccfc39434234d5cd96072c82 Mon Sep 17 00:00:00 2001 From: Bas van Schaik Date: Thu, 16 Nov 2017 15:44:46 +0000 Subject: [PATCH 3/4] fix lgtm.com alert: make 'req' a local variable https://lgtm.com/projects/g/google/bottery/snapshot/84eb50a08253ebc2e531730521d1f27d9b9fb686/files/js/bots.js#xe145e0ccabbbf86f:1 --- js/bots.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/bots.js b/js/bots.js index f7a9501..257979b 100644 --- a/js/bots.js +++ b/js/bots.js @@ -16,7 +16,7 @@ function loadBot(name, map) { console.info("Loading bot '%s'", name); - req = $.ajax("bots/" + name + ".js", { + var req = $.ajax("bots/" + name + ".js", { async: false, dataType: "script", }); From 47a6fad94a2b2b3e49e0e462764c57b625a11e5e Mon Sep 17 00:00:00 2001 From: Bas van Schaik Date: Thu, 16 Nov 2017 15:46:26 +0000 Subject: [PATCH 4/4] fix lgtm.com alert: remove unreachable statement https://lgtm.com/projects/g/google/bottery/snapshot/84eb50a08253ebc2e531730521d1f27d9b9fb686/files/js/blackboard2.js#xd10c0b9941985b4:1 --- js/blackboard2.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/js/blackboard2.js b/js/blackboard2.js index 433c4b2..9663511 100644 --- a/js/blackboard2.js +++ b/js/blackboard2.js @@ -258,8 +258,6 @@ function createBasicFunctions() { amt += s.charCodeAt(i); } return amt % 100; - - return 0; }, play: function(filename) {