diff --git a/www/common/notifications.js b/www/common/notifications.js index 136117c6f..1d7f2921c 100644 --- a/www/common/notifications.js +++ b/www/common/notifications.js @@ -57,7 +57,12 @@ define([ .html(Messages._getKey(key, [msg.content.name || Messages.anonymous, msg.content.title])); $(el).find('.cp-notification-content').addClass("cp-clickable") .click(function () { - common.openURL(msg.content.href); + var todo = function () { common.openURL(msg.content.href); }; + if (!msg.content.password) { return void todo(); } + common.getSframeChannel().query('Q_SESSIONSTORAGE_PUT', { + key: 'newPadPassword', + value: msg.content.password + }, todo); }); $(el).find('.cp-notification-dismiss').css('display', 'flex'); }; diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index 838f415e4..fba08279a 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -223,6 +223,11 @@ define([ sframeChan.event("EV_PAD_PASSWORD"); }; + if (!val && sessionStorage.newPadPassword) { + val = sessionStorage.newPadPassword; + delete sessionStorage.newPadPassword; + } + if (val) { password = val; Cryptpad.getFileSize(window.location.href, password, waitFor(function (e, size) {