feedback when logging in or registering

pull/1/head
ansuz 8 years ago
parent 4c3e842664
commit 218f2ff76c

@ -103,11 +103,13 @@ define([
return; return;
}; };
var feedback = common.feedback = function (action) { var feedback = common.feedback = function (action, force) {
if (!action) { return; } if (force !== true) {
try { if (!action) { return; }
if (!getStore().getProxy().proxy.allowUserFeedback) { return; } try {
} catch (e) { return void console.error(e); } if (!getStore().getProxy().proxy.allowUserFeedback) { return; }
} catch (e) { return void console.error(e); }
}
var href = '/common/feedback.html?' + action + '=' + (+new Date()); var href = '/common/feedback.html?' + action + '=' + (+new Date());
console.log('[feedback] %s', href); console.log('[feedback] %s', href);

@ -81,6 +81,7 @@ define([
proxy.edPrivate = result.edPrivate; proxy.edPrivate = result.edPrivate;
proxy.edPublic = result.edPublic; proxy.edPublic = result.edPublic;
Cryptpad.feedback('LOGIN', true);
Cryptpad.whenRealtimeSyncs(result.realtime, function() { Cryptpad.whenRealtimeSyncs(result.realtime, function() {
Cryptpad.login(result.userHash, result.userName, function () { Cryptpad.login(result.userHash, result.userName, function () {
if (sessionStorage.redirectTo) { if (sessionStorage.redirectTo) {

@ -67,11 +67,7 @@ define([
proxy.edPublic = result.edPublic; proxy.edPublic = result.edPublic;
proxy.edPrivate = result.edPrivate; proxy.edPrivate = result.edPrivate;
// feedback API won't work because proxy wasn't loaded Cryptpad.feedback('REGISTRATION', true);
$.ajax({
type: 'HEAD',
url: '/common/feedback.html?REGISTRATION=' + (+new Date()),
});
Cryptpad.whenRealtimeSyncs(result.realtime, function () { Cryptpad.whenRealtimeSyncs(result.realtime, function () {
Cryptpad.login(result.userHash, result.userName, function () { Cryptpad.login(result.userHash, result.userName, function () {

Loading…
Cancel
Save