How to configure Desktop Notification in Conkeror browser?

76 Views Asked by At

How can I enable Desktop Notification for web apps (Slack, for example)?

I didn't find anything about this on Conkeror Wiki, Mailling List or Google :(

Thanks!

1

There are 1 best solutions below

0
On

To add desktop notification for Conkeror, you need to use the XPCOM nsIPermissionManager interface, for example

var permissionManager = Components.classes["@mozilla.org/permissionmanager;1"]
        .getService(Components.interfaces.nsIPermissionManager);

permissionManager.add(
    make_uri("http://www.messenger.com/"),
    "desktop-notification",
    Components.interfaces.nsIPermissionManager.ALLOW_ACTION
  );