зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1071117 - "Add support to distinguish organic and inorganic feedback." r=margaret
This commit is contained in:
Родитель
e95da48b1b
Коммит
fc22435df1
|
@ -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 });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче