From 6f9d438d4dd286a256ef14fc5e7ecdb491ab3cf2 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 9 Sep 2019 17:53:57 +0200 Subject: [PATCH 1/2] fix hacky detection of secure 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 101bae6ee..e54531f0d 100644 --- a/www/common/notify.js +++ b/www/common/notify.js @@ -7,7 +7,7 @@ define(['/api/config'], function (ApiConfig) { var document = window.document; var isSupported = Module.isSupported = function () { - return typeof(window.Notification) === 'function' && window.location.protocol === 'https:'; + return typeof(window.Notification) === 'function' && window.isSecureContext; }; var hasPermission = Module.hasPermission = function () { From 9f9bce7ac519919cc8c453f619b80d40c81671fb Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 9 Sep 2019 18:02:08 +0200 Subject: [PATCH 2/2] create the 'what is cryptpad' pad as owned when you register --- www/common/outer/async-store.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 2b301b20b..beae6a523 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -642,8 +642,13 @@ define([ href: href, channel: channel, title: data.driveReadmeTitle, + owners: [ store.proxy.edPublic ], }; Store.addPad(clientId, fileData, cb); + }, { + metadata: { + owners: [ store.proxy.edPublic ], + }, }); }); };