avoid triggering a warning when using the Notifications API in an insecure context
This commit is contained in:
parent
c7cea7fae3
commit
c9be2fae36
@ -6,7 +6,7 @@ define(['/api/config'], function (ApiConfig) {
|
|||||||
|
|
||||||
|
|
||||||
var isSupported = Module.isSupported = function () {
|
var isSupported = Module.isSupported = function () {
|
||||||
return typeof(window.Notification) === 'function';
|
return typeof(window.Notification) === 'function' && window.location.protocol === 'https:';
|
||||||
};
|
};
|
||||||
|
|
||||||
var hasPermission = Module.hasPermission = function () {
|
var hasPermission = Module.hasPermission = function () {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user