Emit HTML5 notifications.

Enables you to be made aware of new chat messages when you minimize the window.
:+1: nice

On Thursday, November 13, 2014 at 2:53 PM, W. Mark Kubacki wrote:

> In static/scripts/controllers/chat.js:
> > + var hidden = false; > + if (typeof document.hidden !== "undefined") { > + hidden = "hidden"; > + } else if (typeof document.mozHidden !== "undefined") { > + hidden = "mozHidden"; > + } else if (typeof document.msHidden !== "undefined") { > + hidden = "msHidden"; > + } else if (typeof document.webkitHidden !== "undefined") { > + hidden = "webkitHidden"; > + } > + > + // $scope.username is not set if the user didn't provide a name and thus didn't display the chat window > + // document[hidden] is true if the page is minimized or tabbed-out — details vary by browser > + if ($scope.username && document[hidden] && msg.type == 'message') { > + var instance = new Notification( > + msg.username + " says:", {  
> Nope: That's the title. Followed by options, of which one is the actual message body.
> https://developer.mozilla.org/en-US/docs/Web/API/notification
>  
> —
> Reply to this email directly or view it on GitHub (https://github.com/vinceprignano/gochatapp/pull/2/files#r20295462).
>  
>  
>  
>  
>