From 57deb5d998a6f20334259efe98bd6a7bdded80eb Mon Sep 17 00:00:00 2001 From: Gabriele Cirulli Date: Mon, 10 Mar 2014 19:38:46 +0100 Subject: [PATCH] move event send after type definition --- js/html_actuator.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/html_actuator.js b/js/html_actuator.js index c825b51..f1c3308 100644 --- a/js/html_actuator.js +++ b/js/html_actuator.js @@ -107,6 +107,8 @@ HTMLActuator.prototype.message = function (won) { var type = won ? "game-won" : "game-over"; var message = won ? "You win!" : "Game over!" + if (ga) ga("send", "event", "game", "end", type, this.score); + this.messageContainer.classList.add(type); this.messageContainer.getElementsByTagName("p")[0].textContent = message; }; -- GitLab