Skip to content

Commit 41047ca

Browse files
committed
support browserify
1 parent 0d9f230 commit 41047ca

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ See [contributing guide](.github/CONTRIBUTING.md)
9494

9595
| Date | Version | Description |
9696
| ----------- | ------- | ----------- |
97+
| 2017-01-22 | v1.0.1 | Maintenance |
9798
| 2017-01-22 | v1.0.0 | Official release |
9899
| 2017-01-22 | v0.0.2 | Initial release |
99100

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simple-web-notification",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Web Notifications made easy.",
55
"authors": [
66
"Sagie Gur-Ari <[email protected]>"

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
| Date | Version | Description |
22
| ----------- | ------- | ----------- |
3+
| 2017-01-22 | v1.0.1 | Maintenance |
34
| 2017-01-22 | v1.0.0 | Official release |
45
| 2017-01-22 | v0.0.2 | Initial release |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simple-web-notification",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Web Notifications made easy.",
55
"author": {
66
"name": "Sagie Gur-Ari",

web-notification.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/*global module: false, define: false */
2+
13
/**
24
* 'showNotification' callback.
35
*
@@ -21,24 +23,27 @@
2123
* @memberof! webNotification
2224
* @alias webNotification.initWebNotification
2325
* @private
24-
* @param {Object} context - The root context (window/global/...)
26+
* @param {Object} global - The root context (window/global/...)
2527
* @param {function} factory - Returns a new instance of the API
2628
*/
27-
(function initWebNotification(context, factory) {
29+
(function initWebNotification(global, factory) {
2830
'use strict';
2931

30-
var webNotification = factory(context.Notification);
32+
/*istanbul ignore next*/
33+
var webNotification = factory(global.Notification || window.Notification);
3134

3235
/*istanbul ignore next*/
33-
if ((typeof context.define === 'function') && context.define.amd) {
34-
context.define(function defineLib() {
36+
if ((typeof define === 'function') && define.amd) {
37+
define(function defineLib() {
3538
return webNotification;
3639
});
37-
} else if ((typeof context.module === 'object') && context.module.exports) {
38-
context.module.exports = webNotification;
40+
} else if ((typeof module === 'object') && module.exports) {
41+
module.exports = webNotification;
3942
} else {
40-
context.webNotification = webNotification;
43+
global.webNotification = webNotification;
4144
}
45+
46+
return webNotification;
4247
}(this, function initWebNotification(NotifyLib) {
4348
'use strict';
4449

0 commit comments

Comments
 (0)