Skip to content
This repository was archived by the owner on Jul 17, 2022. It is now read-only.

Add support for browser Chrome notifications#101

Open
krustnic wants to merge 12 commits intodylang:masterfrom
krustnic:chrome-notify
Open

Add support for browser Chrome notifications#101
krustnic wants to merge 12 commits intodylang:masterfrom
krustnic:chrome-notify

Conversation

@krustnic
Copy link

Added new platform - browser Chrome. To use Chrome notifications it is needed to install chrome extension (which creates http server and proxies all requests to Chrome Notifications API).

Since grunt-notify searches for supported platform in certain order Chrome platform may not be used because there may be another supported platform (for example 'notification-center' on Mac OS). So the ability to manually specify which platform you want to use is also added. For this reason new option 'platform' is added. It is an object with two properties: 'name' and 'port' (both are optional), for example:

grunt.initConfig({
  notify: {
    mac: {
      options: {
        title: 'Notify Title',
        message: 'This message is shown by Notification Center or not shown at all!',
        platform : {
          // 'growl-notify', 'hey-snarl', 'notification-center', 'notify-send', 'toaster', 'chrome'
          name : 'notification-center'
        }
      }
    },
    chrome: {
      options: {
        title: 'Notify Title',
        message: 'This message is shown by Chrome or not shown at all!',
        platform : {
          name : 'chrome',
          port : 8989
        }
      }
    }
  }
});

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant