You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,12 +18,6 @@ bower install push.js --save
18
18
19
19
For more information regarding the Push NPM package, [see here](https://www.npmjs.com/package/push.js).
20
20
21
-
#### See It In Action ####
22
-
23
-
Before you go out and try Push for yourself, you probably want to confirm it actually works in your browser, right?
24
-
25
-
Lucky for you a demo is available [here](http://nickersoft.github.io/push.js/demo.html).
26
-
27
21
#### Creating Notifications ####
28
22
So just how easy is it to create a notification using Push? We can do it in just one line, actually:
29
23
@@ -97,6 +91,17 @@ Push.create('Hello World!', {
97
91
*__onShow__: Callback to execute when the notification is shown (obsolete).
98
92
*__tag__: Unique tag used to identify the notification. Can be used to later close the notification manually.
99
93
*__timeout__: Time in milliseconds until notification closes automatically.
94
+
*__vibrate__: An array of durations for a mobile device receiving the notification to vibrate. For example, [200, 100] would vibrate first for 200 milliseconds, pause, then continue for 100 milliseconds. For more information, see below.
95
+
96
+
### Mobile Support ###
97
+
98
+
Push can be used on Android Chrome (apparently Safari on iOS does not have notification support), but the website in which it is running on ***must*** use have a valid SSL certificate (HTTPS only!!) otherwise it will not work. This is due to Google's [decision to drop the Notification constructor](https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/BygptYClroM) from mobile Chrome. Sucks but hey, that's life, am I right?
99
+
100
+
### See It In Action ###
101
+
102
+
Before you go out and try Push for yourself, you probably want to confirm it actually works in your browser, right?
103
+
104
+
Lucky for you a demo is available [here](http://nickersoft.github.io/push.js/demo.html).
0 commit comments