Bug 1071117 - "Add support to distinguish organic and inorganic feedback." r=margaret

This commit is contained in:
vivek 2014-10-14 13:35:00 +02:00
parent e95da48b1b
commit fc22435df1
2 changed files with 10 additions and 1 deletions

View File

@ -12,7 +12,7 @@ var Feedback = {
try {
Services.prefs.getCharPref("distribution.id");
} catch (e) {
BrowserApp.addTab("about:feedback", { selected: true, parentId: BrowserApp.selectedTab.id });
BrowserApp.addTab("about:feedback?source=feedback-prompt", { selected: true, parentId: BrowserApp.selectedTab.id });
}
}
};

View File

@ -147,6 +147,15 @@ function sendFeedback(aEvent) {
data["locale"] = Services.locale.getSystemLocale().getCategory("NSILOCALE_CTYPE");
data["channel"] = UpdateChannel.get();
// Source field is added only when Fennec prompts the user.
let getParam = window.location.href.split("?");
if (getParam.length > 1) {
let urlParam = new URLSearchParams(getParam[1]);
if(urlParam.get("source")) {
data["source"] = urlParam.get("source");
}
}
let req = new XMLHttpRequest();
req.addEventListener("error", function() {
Cu.reportError("Error sending feedback to input.mozilla.org: " + req.statusText);