зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1545052 - Fix broken about:preferences link (Android), r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D28169 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
b44585f969
Коммит
a3b108d583
|
@ -177,17 +177,19 @@ var Settings = {
|
|||
|
||||
let elements = document.getElementsByClassName("change-data-choices-link");
|
||||
for (let el of elements) {
|
||||
el.addEventListener("click", function() {
|
||||
if (AppConstants.platform == "android") {
|
||||
var {EventDispatcher} = ChromeUtils.import("resource://gre/modules/Messaging.jsm");
|
||||
EventDispatcher.instance.sendRequest({
|
||||
type: "Settings:Show",
|
||||
resource: "preferences_privacy",
|
||||
});
|
||||
} else {
|
||||
// Show the data choices preferences on desktop.
|
||||
let mainWindow = getMainWindowWithPreferencesPane();
|
||||
mainWindow.openPreferences("privacy-reports");
|
||||
el.parentElement.addEventListener("click", function(event) {
|
||||
if (event.target.localName === "a") {
|
||||
if (AppConstants.platform == "android") {
|
||||
var {EventDispatcher} = ChromeUtils.import("resource://gre/modules/Messaging.jsm");
|
||||
EventDispatcher.instance.sendRequest({
|
||||
type: "Settings:Show",
|
||||
resource: "preferences_privacy",
|
||||
});
|
||||
} else {
|
||||
// Show the data choices preferences on desktop.
|
||||
let mainWindow = getMainWindowWithPreferencesPane();
|
||||
mainWindow.openPreferences("privacy-reports");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -213,14 +215,6 @@ var Settings = {
|
|||
|
||||
this.attachObservers();
|
||||
},
|
||||
|
||||
convertStringToLink(string) {
|
||||
let link = document.createElement("a");
|
||||
link.setAttribute("href", "#");
|
||||
link.setAttribute("class", "change-data-choices-link");
|
||||
link.textContent = string;
|
||||
return link;
|
||||
},
|
||||
};
|
||||
|
||||
var PingPicker = {
|
||||
|
|
|
@ -134,7 +134,7 @@
|
|||
|
||||
<section id="home-section" class="active">
|
||||
<p id="page-subtitle"></p>
|
||||
<p id="settings-explanation"><a id="uploadLink" data-l10n-name="upload-link" href="about:preferences#privacy"></a></p>
|
||||
<p id="settings-explanation"><a id="uploadLink" data-l10n-name="upload-link" class="change-data-choices-link" href="#"></a></p>
|
||||
<p id="ping-explanation"><a id="pingLink" data-l10n-name="ping-link" href="https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/concepts/pings.html"></a></p>
|
||||
<p data-l10n-id="about-telemetry-more-information"></p>
|
||||
<ul>
|
||||
|
|
Загрузка…
Ссылка в новой задаче