Add feedback about crowdfunding

pull/1/head
yflory 6 years ago
parent f662036817
commit bd1b120ab1

@ -86,6 +86,7 @@ var setHeaders = (function () {
(function () { (function () {
if (!config.logFeedback) { return; } if (!config.logFeedback) { return; }
console.log(config.logFeedback);
const logFeedback = function (url) { const logFeedback = function (url) {
url.replace(/\?(.*?)=/, function (all, fb) { url.replace(/\?(.*?)=/, function (all, fb) {

@ -2354,19 +2354,23 @@ define([
$(yes).click(function () { $(yes).click(function () {
modal.delete(); modal.delete();
common.openURL('https://opencollective.com/cryptpad/contribute'); common.openURL('https://opencollective.com/cryptpad/contribute');
Feedback.send('CROWDFUNDING_YES');
}); });
$(modal.popup).find('a').click(function (e) { $(modal.popup).find('a').click(function (e) {
e.stopPropagation(); e.stopPropagation();
e.preventDefault(); e.preventDefault();
modal.delete(); modal.delete();
common.openURL('https://opencollective.com/cryptpad/'); common.openURL('https://opencollective.com/cryptpad/');
Feedback.send('CROWDFUNDING_LINK');
}); });
$(no).click(function () { $(no).click(function () {
modal.delete(); modal.delete();
Feedback.send('CROWDFUNDING_NO');
}); });
$(never).click(function () { $(never).click(function () {
modal.delete(); modal.delete();
common.setAttribute(['general', 'crowdfunding'], false); common.setAttribute(['general', 'crowdfunding'], false);
Feedback.send('CROWDFUNDING_NEVER');
}); });
}); });

Loading…
Cancel
Save