2

Facebook have done a great work in Notification.Usually we get desktop popup notification when we add the extensions from chrome webstore.But in facebook we can enable the extension without using chrome webstore.Please see the image. enter image description here How we can do like that ?

NB:I know the code for showing notification.I want to know how we can add the extension without using chrome webstore,see the given image;facebook done it.

mob_web_dev
  • 2,342
  • 1
  • 20
  • 42
  • Possible duplicate of [Chrome desktop notification example?](http://stackoverflow.com/questions/2271156/chrome-desktop-notification-example) –  Feb 02 '16 at 15:14
  • @Austin It is not a duplicate question.Please recheck my question :) – mob_web_dev Feb 03 '16 at 12:26

1 Answers1

1

This probably refers to Push Notifications feature of Chrome using the draft Push API, which is implemented using Service Workers and GCM.

The linked article contains a detailed example; it's too long to reproduce here.

I want to know how we can add the extension without using chrome webstore,see the given image;facebook done it.

Facebook does not add an extension. What it does is adding a Service Worker, than can receive push messages and show notifications if the user agrees to allow Facebook to show them.

This is a good tutorial on the topic.

Xan
  • 74,770
  • 16
  • 179
  • 206