mirror of
https://github.com/danog/2048.git
synced 2024-11-27 03:44:43 +01:00
move event send after type definition
This commit is contained in:
parent
a422799481
commit
57deb5d998
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user