From c9be2fae363c9adce794243098b39bc5e99431e1 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 9 Sep 2019 15:59:56 +0200 Subject: [PATCH] avoid triggering a warning when using the Notifications API in an insecure context --- www/common/notify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/notify.js b/www/common/notify.js index 5109e8748..dc5c19ad5 100644 --- a/www/common/notify.js +++ b/www/common/notify.js @@ -6,7 +6,7 @@ define(['/api/config'], function (ApiConfig) { var isSupported = Module.isSupported = function () { - return typeof(window.Notification) === 'function'; + return typeof(window.Notification) === 'function' && window.location.protocol === 'https:'; }; var hasPermission = Module.hasPermission = function () {