Tuesday, April 10, 2012

Html Notifications

Chrome has a simple API spec for doing "desktop notifications" from webpages. There's even a quasi-standard "editors draft" at the W3C for it.

Luckily someone has been nice enough to write a Firefox add-on to implement the API in Firefox (open source).

Unfortunately some sites such as Flowdock only sniff for the presence of the API in the DOM instead of actually doing a call to the API to ask user permission as suggested by the spec itself and so fails due to the different approach taken by the add0on vs the implementation in Chrome.

Luckily this is easily fixed by pre-approving Flowdocks url via a property in about:config

key: extensions.html5notifications.permissions
value: {"www.210computing.com":0, "mydomain.flowdock.com" : 0}

No comments:

Post a Comment