From de5a21fe5724a582f2dfd7a5bbbfd35eda88236b Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 27 Feb 2017 12:06:49 +0100 Subject: [PATCH] add a simple feedback api and text explaining what it is --- www/common/cryptpad-common.js | 9 +++++++++ www/common/feedback.html | 17 +++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 www/common/feedback.html diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 80097e08c..8e883e47a 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -23,6 +23,15 @@ define([ Messages: Messages, Alertify: Alertify, }; + + common.feedback = function (action) { + if (!action) { return; } + $.ajax({ + type: "HEAD", + url: '/common/feedback.html?' + action + '=' + (+new Date()), + }); + }; + var store; var find = common.find = function (map, path) { diff --git a/www/common/feedback.html b/www/common/feedback.html new file mode 100644 index 000000000..f25a7cb40 --- /dev/null +++ b/www/common/feedback.html @@ -0,0 +1,17 @@ + + + + + +

If you're reading this, you were probably curious why CryptPad is requesting web pages when you perform certain actions.

+

We care about your privacy, and at the same time we want CryptPad to be very easy to use. + We use this file to figure out which UI features matter to our users, by requesting it along with a parameter specifying which action was taken.

+

If you would like to opt out, visit your user settings page, where you'll find a checkbox to enable or disable user feedback

+ +