vue-native-notification
Advanced tools
Comparing version 1.0.5 to 1.1.1
@@ -67,3 +67,2 @@ // Notification object | ||
const bindOnError = function (event) { | ||
@@ -104,4 +103,5 @@ 'use strict' | ||
} catch (e) { | ||
if (e.name !== 'TypeError') | ||
if (e.name !== 'TypeError') { | ||
return e | ||
} | ||
@@ -108,0 +108,0 @@ return navigator.serviceWorker.ready.then( |
@@ -0,0 +0,0 @@ The MIT License (MIT) |
{ | ||
"name": "vue-native-notification", | ||
"version": "1.0.5", | ||
"version": "1.1.1", | ||
"description": "Vue.js plugin for native notifications", | ||
@@ -25,3 +25,3 @@ "main": "index.js", | ||
"babelify": "^7.3.0", | ||
"browserify": "^14.4.0", | ||
"browserify": "^14.5.0", | ||
"standard": "*", | ||
@@ -28,0 +28,0 @@ "uglify-js": "^3.0.28" |
@@ -0,0 +0,0 @@ # vue-native-notification |
@@ -1,1 +0,1 @@ | ||
(function(){function a(i,u,c){function f(r,n){if(!u[r]){if(!i[r]){var o="function"==typeof require&&require;if(!n&&o)return o(r,!0);if(s)return s(r,!0);var t=new Error("Cannot find module '"+r+"'");throw t.code="MODULE_NOT_FOUND",t}var e=u[r]={exports:{}};i[r][0].call(e.exports,function(n){var o=i[r][1][n];return f(o||n)},e,e.exports,a,i,u,c)}return u[r].exports}for(var s="function"==typeof require&&require,n=0;n<c.length;n++)f(c[n]);return f}return a})()({1:[function(n,o,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});var f=window.Notification||window.webkitNotification;var s=function n(o){};var a=function n(o){o.preventDefault();window.focus();o.target.close()};var w=function n(o){};var v=function n(o){};var l={onerror:s,onclick:a,onclose:w,onshow:v};var t={install:function n(o,r){r=r||{};r.requestOnNotify=r.requestOnNotify||true;o.notification={};o.prototype.$notification={};var t=function n(){return f.requestPermission()};o.notification.requestPermission=t;o.prototype.$notification.requestPermission=t;var e=function n(u,c,o){o.onerror=function(){};o.onclick=function(){};o.onclose=function(){};o.onshow=function(){};return Promise.resolve().then(function(){if(r.requestOnNotify&&f.permission!=="granted"){return t()}return f.permission}).then(function(n){if(n==="denied"){return new Error("No permission to show notification")}var o=function n(o){"use strict";l.onerror(o);s()};var r=function n(o){"use strict";l.onclick(o);a()};var t=function n(o){"use strict";l.onclose(o);w()};var e=function n(o){"use strict";l.onshow(o);v()};try{var i=new f(u,c);i.onerror=o;i.onclick=r;i.onclose=t;i.onshow=e;return i}catch(n){if(n.name!=="TypeError")return n;return navigator.serviceWorker.ready.then(function(n){return n.showNotification(u,c)}).then(e,o)}})};o.notification.show=e;o.prototype.$notification.show=e}};if(typeof window!=="undefined"&&window.Vue){window.Vue.use(t)}r.default=t},{}]},{},[1]); | ||
(function(){function a(e,c,u){function f(r,n){if(!c[r]){if(!e[r]){var o="function"==typeof require&&require;if(!n&&o)return o(r,!0);if(s)return s(r,!0);var t=new Error("Cannot find module '"+r+"'");throw t.code="MODULE_NOT_FOUND",t}var i=c[r]={exports:{}};e[r][0].call(i.exports,function(n){var o=e[r][1][n];return f(o||n)},i,i.exports,a,e,c,u)}return c[r].exports}for(var s="function"==typeof require&&require,n=0;n<u.length;n++)f(u[n]);return f}return a})()({1:[function(n,o,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});var s=window.Notification||window.webkitNotification;var t=function n(o){};var i=function n(o){o.preventDefault();window.focus();o.target.close()};var e=function n(o){};var c=function n(o){};var a={onerror:t,onclick:i,onclose:e,onshow:c};var u={install:function n(o,r){r=r||{};r.requestOnNotify=r.requestOnNotify||true;o.notification={};o.prototype.$notification={};var t=function n(){return s.requestPermission()};o.notification.requestPermission=t;o.prototype.$notification.requestPermission=t;var i=function n(c,u,f){if(!f.onerror)f.onerror=function(){};if(!f.onclick)f.onclick=function(){};if(!f.onclose)f.onclose=function(){};if(!f.onshow)f.onshow=function(){};return Promise.resolve().then(function(){if(r.requestOnNotify&&s.permission!=="granted"){return t()}return s.permission}).then(function(n){if(n==="denied"){return new Error("No permission to show notification")}var o=function n(o){"use strict";a.onerror(o);f.onerror(o)};var r=function n(o){"use strict";a.onclick(o);f.onclick(o)};var t=function n(o){"use strict";a.onclose(o);f.onclose(o)};var i=function n(o){"use strict";a.onshow(o);f.onshow(o)};try{var e=new s(c,u);e.onerror=o;e.onclick=r;e.onclose=t;e.onshow=i;return e}catch(n){if(n.name!=="TypeError"){return n}return navigator.serviceWorker.ready.then(function(n){n.showNotification(c,u)}).then(i,o)}})};o.notification.show=i;o.prototype.$notification.show=i}};if(typeof window!=="undefined"&&window.Vue){window.Vue.use(u)}r.default=u},{}]},{},[1]); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112
10111
6