From 500fae524d98c2d38e069f7dd1f7389dc7cd4d9c Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sun, 27 Dec 2015 21:19:11 -0800 Subject: [PATCH] Changes to match hogfather API, stop with focus setting games. --- static/babystats.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/static/babystats.js b/static/babystats.js index 5e8b138..6a77563 100644 --- a/static/babystats.js +++ b/static/babystats.js @@ -56,9 +56,9 @@ BabyStats.prototype.onChatReady_ = function(chat) { BabyStats.prototype.handleMessage_ = function(message) { - switch (message.type) { + switch (message.message.type) { case 'child_name_change': - this.childName_.value = message.child_name; + this.childName_.value = message.message.child_name; this.checkOverlay_(); break; default: @@ -366,7 +366,6 @@ BabyStats.prototype.buildLayout_ = function() { this.childName_.addEventListener('input', this.checkOverlay_.bind(this)); this.childName_.addEventListener('input', this.onChildNameChange_.bind(this)); this.container_.appendChild(this.childName_); - this.childName_.focus(); this.yourName_ = document.createElement('input'); this.addCSSClass_(this.yourName_, 'babyStatsYourName');