Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

making it possible to set additional gritter options

  • Loading branch information...
commit e7c88c2e0b1b40738edd10e7943ba31db1548c39 1 parent 65c6d06
Phil Leggetter leggetter authored

Showing 1 changed file with 8 additions and 3 deletions. Show diff stats Hide diff stats

  1. +8 3 src/PusherNotifier.js
11 src/PusherNotifier.js
@@ -5,7 +5,8 @@ function PusherNotifier(channel, options) {
5 5 eventName: 'notifications',
6 6 title: 'Notification',
7 7 image: 'images/notify.png',
8   - eventTextProperty: 'message'
  8 + eventTextProperty: 'message',
  9 + gritterOptions: {}
9 10 };
10 11
11 12 $.extend(this.settings, options);
@@ -14,9 +15,13 @@ function PusherNotifier(channel, options) {
14 15 channel.bind(this.settings.eventName, function(data){ self._handleNotification(data); });
15 16 };
16 17 PusherNotifier.prototype._handleNotification = function(data) {
17   - $.gritter.add({
  18 + var gritterOptions = {
18 19 title: this.settings.title,
19 20 text: data[this.settings.eventTextProperty].replace(/\\/g, ''),
20 21 image: this.settings.image
21   - });
  22 + };
  23 +
  24 + $.extend(gritterOptions, this.settings.gritterOptions);
  25 +
  26 + $.gritter.add(gritterOptions);
22 27 };

0 comments on commit e7c88c2

Please sign in to comment.
Something went wrong with that request. Please try again.