From b65b7b5d6799ee1b81ec2d4e234450ea8f03324d Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Thu, 21 Apr 2016 10:13:28 +0000 Subject: [PATCH] Fixes Edge. Yep. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3213 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- core/client.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/client.js b/core/client.js index 27bd57c4..f15ea387 100644 --- a/core/client.js +++ b/core/client.js @@ -130,7 +130,9 @@ function receive(data) { send({event: "hashChange", hash: window.location.hash}); } } else if (line && line[0] && line[0].action == "notify") { - new Notification(line[0].title, line[0].options); + if (window.Notification) { + new Notification(line[0].title, line[0].options); + } } else if (line && line[0] && line[0].action == "title") { window.document.title = line[0].value; } else if (line && line[0] && line[0].action == "prompt") { @@ -413,7 +415,7 @@ function onMessage(event) { var gSocket; window.addEventListener("load", function() { - if (Notification) { + if (window.Notification) { Notification.requestPermission(); } var input = document.getElementById("input");