On line 17:
var data = JSON.parse(e.data);
var data = e.data;
The data is already json.
Trying to parse it twice throws an: "Uncaught SyntaxError: Unexpected token #" console error.
You could also simplify by just doing: