зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1569614 - Add SUMO content links. r=ewright,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D40902 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
b95f4c5f69
Коммит
420708d31b
|
@ -1613,6 +1613,15 @@ pref("browser.contentblocking.report.monitor.enabled", true);
|
|||
pref("browser.contentblocking.report.monitor.url", "https://monitor.firefox.com");
|
||||
pref("browser.contentblocking.report.lockwise.url", "https://lockwise.firefox.com/");
|
||||
|
||||
// Protection Report's SUMO urls
|
||||
pref("browser.contentblocking.report.monitor.how_it_works.url", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/monitor-faq");
|
||||
pref("browser.contentblocking.report.lockwise.how_it_works.url", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/password-manager-report");
|
||||
pref("browser.contentblocking.report.social.url", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/social-media-tracking-report");
|
||||
pref("browser.contentblocking.report.cookie.url", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/cross-site-tracking-report");
|
||||
pref("browser.contentblocking.report.tracker.url", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/tracking-content-report");
|
||||
pref("browser.contentblocking.report.fingerprinter.url", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/fingerprinters-report");
|
||||
pref("browser.contentblocking.report.cryptominer.url", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/cryptominers-report");
|
||||
|
||||
// Enables the new Protections Panel.
|
||||
#ifdef NIGHTLY_BUILD
|
||||
pref("browser.protections_panel.enabled", true);
|
||||
|
|
|
@ -8,6 +8,9 @@ const LOCKWISE_URL = RPMGetStringPref(
|
|||
"browser.contentblocking.report.lockwise.url",
|
||||
""
|
||||
);
|
||||
const HOW_IT_WORKS_URL_PREF = RPMGetFormatURLPref(
|
||||
"browser.contentblocking.report.lockwise.how_it_works.url"
|
||||
);
|
||||
|
||||
export default class LockwiseCard {
|
||||
constructor(document) {
|
||||
|
@ -26,18 +29,25 @@ export default class LockwiseCard {
|
|||
RPMSendAsyncMessage("OpenAboutLogins");
|
||||
});
|
||||
|
||||
const syncLink = this.doc.querySelector(".synced-devices-text a");
|
||||
const syncLink = this.doc.getElementById("turn-on-sync");
|
||||
// Register a click handler for the anchor since it's not possible to navigate to about:preferences via href
|
||||
syncLink.addEventListener("click", () => {
|
||||
this.doc.sendTelemetryEvent("click", "lw_app_link");
|
||||
RPMSendAsyncMessage("OpenSyncPreferences");
|
||||
});
|
||||
const eventHandler = evt => {
|
||||
if (evt.keyCode == evt.DOM_VK_RETURN || evt.type == "click") {
|
||||
this.doc.sendTelemetryEvent("click", "lw_app_link");
|
||||
RPMSendAsyncMessage("OpenSyncPreferences");
|
||||
}
|
||||
};
|
||||
syncLink.addEventListener("click", eventHandler);
|
||||
syncLink.addEventListener("keydown", eventHandler);
|
||||
|
||||
// Attach link to Firefox Lockwise app page.
|
||||
const lockwiseAppLink = this.doc.getElementById("lockwise-inline-link");
|
||||
lockwiseAppLink.href = LOCKWISE_URL;
|
||||
lockwiseAppLink.addEventListener("click", () => {
|
||||
this.doc.sendTelemetryEvent("click", "lw_sync_link");
|
||||
});
|
||||
|
||||
// Attack link to Firefox Lockwise "How it works" page.
|
||||
const lockwiseReportLink = this.doc.getElementById("lockwise-how-it-works");
|
||||
lockwiseReportLink.addEventListener("click", () => {
|
||||
this.doc.sendTelemetryEvent("click", "lw_about_link");
|
||||
|
@ -115,6 +125,9 @@ export default class LockwiseCard {
|
|||
"lockwise-passwords-stored"
|
||||
);
|
||||
|
||||
const howItWorksLink = this.doc.getElementById("lockwise-how-it-works");
|
||||
howItWorksLink.href = HOW_IT_WORKS_URL_PREF;
|
||||
|
||||
// Set the text for the number of synced devices.
|
||||
const syncedDevicesBlock = container.querySelector(
|
||||
".number-of-synced-devices.block"
|
||||
|
@ -134,7 +147,7 @@ export default class LockwiseCard {
|
|||
}
|
||||
// Display the link for enabling sync if no synced devices are detected.
|
||||
if (syncedDevices === 0) {
|
||||
const syncLink = syncedDevicesText.querySelector("a");
|
||||
const syncLink = this.doc.getElementById("turn-on-sync");
|
||||
syncLink.classList.remove("hidden");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,9 @@ const MONITOR_SIGN_IN_URL = RPMGetStringPref(
|
|||
"browser.contentblocking.report.monitor.url",
|
||||
""
|
||||
);
|
||||
const HOW_IT_WORKS_URL_PREF = RPMGetFormatURLPref(
|
||||
"browser.contentblocking.report.monitor.how_it_works.url"
|
||||
);
|
||||
|
||||
export default class MonitorClass {
|
||||
constructor(document) {
|
||||
|
@ -15,6 +18,9 @@ export default class MonitorClass {
|
|||
}
|
||||
|
||||
init() {
|
||||
const monitorLinkTag = this.doc.getElementById("monitor-inline-link");
|
||||
monitorLinkTag.href = MONITOR_SIGN_IN_URL;
|
||||
|
||||
RPMAddMessageListener("SendUserLoginsData", ({ data }) => {
|
||||
// Wait for monitor data and display the card.
|
||||
this.getMonitorData(data);
|
||||
|
@ -111,6 +117,9 @@ export default class MonitorClass {
|
|||
);
|
||||
monitorCardBody.classList.remove("hidden");
|
||||
|
||||
const howItWorksLink = this.doc.getElementById("monitor-link");
|
||||
howItWorksLink.href = HOW_IT_WORKS_URL_PREF;
|
||||
|
||||
const storedEmail = this.doc.querySelector(
|
||||
"span[data-type='stored-emails']"
|
||||
);
|
||||
|
|
|
@ -526,6 +526,7 @@ label[for="tab-cryptominer"]:hover ~ #highlight-hover {
|
|||
.monitor-card #monitor-header-content > a {
|
||||
display: block;
|
||||
margin-block-start: 5px;
|
||||
width: max-content;
|
||||
}
|
||||
|
||||
.monitor-card.has-logins #monitor-body-content {
|
||||
|
|
|
@ -41,19 +41,19 @@ etp-card-content = Trackers follow you around online to collect information abou
|
|||
graph-today = Today
|
||||
|
||||
social-tab-title = Social Media Trackers
|
||||
social-tab-contant = Social media like, post, and comment buttons on other websites can track you — even if you don’t use them. Logging in to sites using your Facebook or Twitter account is another way they can track what you do on those sites. We remove these trackers so Facebook and Twitter see less of what you do online.
|
||||
social-tab-contant = Social media like, post, and comment buttons on other websites can track you — even if you don’t use them. Logging in to sites using your Facebook or Twitter account is another way they can track what you do on those sites. We remove these trackers so Facebook and Twitter see less of what you do online. <a data-l10n-name="learn-more-link">Learn more</a>
|
||||
|
||||
cookie-tab-title = Cross-Site Tracking Cookies
|
||||
cookie-tab-content = Cross-site tracking cookies follow you from site to site to collect data about your browsing habits. Advertisers and analytics companies gather this data to create a profile of your interests across many sites. Blocking them reduces the number of personalized ads that follow you around.
|
||||
cookie-tab-content = Cross-site tracking cookies follow you from site to site to collect data about your browsing habits. Advertisers and analytics companies gather this data to create a profile of your interests across many sites. Blocking them reduces the number of personalized ads that follow you around. <a data-l10n-name="learn-more-link">Learn more</a>
|
||||
|
||||
tracker-tab-title = Tracking Content
|
||||
tracker-tab-content = Websites may load outside ads, videos, and other content that contain hidden trackers. Blocking tracking content can make websites load faster, but some buttons, forms, and login fields might not work.
|
||||
tracker-tab-content = Websites may load outside ads, videos, and other content that contain hidden trackers. Blocking tracking content can make websites load faster, but some buttons, forms, and login fields might not work. <a data-l10n-name="learn-more-link">Learn more</a>
|
||||
|
||||
fingerprinter-tab-title = Fingerprinters
|
||||
fingerprinter-tab-content = Fingerprinting is a form of online tracking that’s different from your real fingerprints. Companies use it to create a unique profile of you using data about your browser, device, and other settings. We block ad trackers from fingerprinting your device.
|
||||
fingerprinter-tab-content = Fingerprinting is a form of online tracking that’s different from your real fingerprints. Companies use it to create a unique profile of you using data about your browser, device, and other settings. We block ad trackers from fingerprinting your device. <a data-l10n-name="learn-more-link">Learn more</a>
|
||||
|
||||
cryptominer-tab-title = Cryptominers
|
||||
cryptominer-tab-content = Some websites host hidden malware that secretly uses your system’s computing power to mine cryptocurrency, or digital money. It drains your battery, slows down your computer, and increases your energy bill. We block known cryptominers from using your computing resources to make money.
|
||||
cryptominer-tab-content = Some websites host hidden malware that secretly uses your system’s computing power to mine cryptocurrency, or digital money. It drains your battery, slows down your computer, and increases your energy bill. We block known cryptominers from using your computing resources to make money. <a data-l10n-name="learn-more-link">Learn more</a>
|
||||
|
||||
lockwise-title = Never forget a password again
|
||||
lockwise-title-logged-in = { -lockwise-brand-name }
|
||||
|
|
|
@ -57,23 +57,33 @@
|
|||
<div id=highlight-hover></div>
|
||||
<div id="social" class="tab-content">
|
||||
<p class="content-title" data-l10n-id="social-tab-title"></p>
|
||||
<p data-l10n-id="social-tab-contant"></p>
|
||||
<p data-l10n-id="social-tab-contant">
|
||||
<a target="_blank" id="social-link" data-l10n-name="learn-more-link"></a>
|
||||
</p>
|
||||
</div>
|
||||
<div id="cookie" class="tab-content">
|
||||
<p class="content-title" data-l10n-id="cookie-tab-title"></p>
|
||||
<p data-l10n-id="cookie-tab-content"></p>
|
||||
<p data-l10n-id="cookie-tab-content">
|
||||
<a target="_blank" id="cookie-link" data-l10n-name="learn-more-link"></a>
|
||||
</p>
|
||||
</div>
|
||||
<div id="tracker" class="tab-content">
|
||||
<p class="content-title" data-l10n-id="tracker-tab-title"></p>
|
||||
<p data-l10n-id="tracker-tab-content"></p>
|
||||
<p data-l10n-id="tracker-tab-content">
|
||||
<a target="_blank" id="tracker-link" data-l10n-name="learn-more-link"></a>
|
||||
</p>
|
||||
</div>
|
||||
<div id="fingerprinter" class="tab-content">
|
||||
<p class="content-title" data-l10n-id="fingerprinter-tab-title"></p>
|
||||
<p data-l10n-id="fingerprinter-tab-content"></p>
|
||||
<p data-l10n-id="fingerprinter-tab-content">
|
||||
<a target="_blank" id="fingerprinter-link" data-l10n-name="learn-more-link"></a>
|
||||
</p>
|
||||
</div>
|
||||
<div id="cryptominer" class="tab-content">
|
||||
<p class="content-title" data-l10n-id="cryptominer-tab-title"></p>
|
||||
<p data-l10n-id="cryptominer-tab-content"></p>
|
||||
<p data-l10n-id="cryptominer-tab-content">
|
||||
<a target="_blank" id="cryptominer-link" data-l10n-name="learn-more-link"></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -91,7 +101,7 @@
|
|||
<span>
|
||||
<!-- Insert Monitor header content here. -->
|
||||
</span>
|
||||
<a id="monitor-link" href="" data-l10n-id="monitor-link"></a>
|
||||
<a target="_blank" href="" id="monitor-link" data-l10n-id="monitor-link"></a>
|
||||
</p>
|
||||
<span class="inline-text-icon monitor-scanned-text" data-l10n-id="auto-scan"></span>
|
||||
</div>
|
||||
|
@ -130,14 +140,14 @@
|
|||
<span id="info-exposed-passwords" class="info-text"></span>
|
||||
</div>
|
||||
<div id="full-report-link" class="monitor-view-full-report" data-l10n-id="full-report-link">
|
||||
<a id="monitor-inline-link" data-l10n-name="monitor-inline-link" href=""></a>
|
||||
<a target="_blank" id="monitor-inline-link" data-l10n-name="monitor-inline-link" href=""></a>
|
||||
</div>
|
||||
<div class="monitor-breached-passwords hidden">
|
||||
<span data-type="breached-lockwise-passwords" class="number-of-breaches block">
|
||||
<!-- Display number of exposed stored passwords here. -->
|
||||
</span>
|
||||
<span id="password-warning">
|
||||
<a id="lockwise-link" href="" data-l10n-name="lockwise-link"></a>
|
||||
<a target="_blank" href="about:logins" id="lockwise-link" data-l10n-name="lockwise-link" data-l10n-title="go-to-saved-logins"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -163,7 +173,7 @@
|
|||
<div class="no-logins hidden">
|
||||
<div class="lockwise-mobile-app-icon"></div>
|
||||
<span data-l10n-id="lockwise-no-logins-content">
|
||||
<a id="lockwise-inline-link" data-l10n-name="lockwise-inline-link" href=""></a>
|
||||
<a target="_blank" id="lockwise-inline-link" data-l10n-name="lockwise-inline-link" href=""></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="has-logins hidden">
|
||||
|
@ -172,7 +182,7 @@
|
|||
</span>
|
||||
<span id="lockwise-passwords-stored" class="inline-text-icon passwords-stored-text">
|
||||
<!-- Display message for stored logins here. -->
|
||||
<a id="lockwise-how-it-works" data-l10n-name="lockwise-how-it-works" href=""></a>
|
||||
<a target="_blank" id="lockwise-how-it-works" data-l10n-name="lockwise-how-it-works" href=""></a>
|
||||
</span>
|
||||
<span class="number-of-synced-devices block">
|
||||
<!-- Display number of synced devices here. -->
|
||||
|
@ -181,7 +191,7 @@
|
|||
<span>
|
||||
<!-- Display message for status of synced devices here. -->
|
||||
</span>
|
||||
<a id="turn-on-sync" class="hidden" href="" data-l10n-id="turn-on-sync"></a>
|
||||
<a id="turn-on-sync" tabindex="0" class="hidden" href="" data-l10n-id="turn-on-sync"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -152,10 +152,15 @@ document.addEventListener("DOMContentLoaded", e => {
|
|||
graph.append(label);
|
||||
date.setDate(date.getDate() - 1);
|
||||
}
|
||||
// Set the total number of each type of tracker on the tabs
|
||||
// Set the total number of each type of tracker on the tabs as well as their
|
||||
// "Learn More" links
|
||||
for (let type of dataTypes) {
|
||||
document.querySelector(`label[data-type=${type}]`).textContent =
|
||||
weekTypeCounts[type];
|
||||
const learnMoreLink = document.getElementById(`${type}-link`);
|
||||
learnMoreLink.href = RPMGetFormatURLPref(
|
||||
`browser.contentblocking.report.${type}.url`
|
||||
);
|
||||
}
|
||||
|
||||
// Hide the trackers tab if the user is in standard and
|
||||
|
|
|
@ -137,6 +137,7 @@ add_task(async function checkTelemetryClickEvents() {
|
|||
}
|
||||
|
||||
const syncLink = await ContentTaskUtils.waitForCondition(() => {
|
||||
// Opens an extra tab
|
||||
return content.document.getElementById("turn-on-sync");
|
||||
}, "syncLink exists");
|
||||
|
||||
|
@ -154,6 +155,7 @@ add_task(async function checkTelemetryClickEvents() {
|
|||
|
||||
await ContentTask.spawn(tab.linkedBrowser, {}, async function() {
|
||||
const openAboutLogins = await ContentTaskUtils.waitForCondition(() => {
|
||||
// Opens an extra tab
|
||||
return content.document.getElementById("open-about-logins-button");
|
||||
}, "openAboutLogins exists");
|
||||
|
||||
|
@ -208,6 +210,7 @@ add_task(async function checkTelemetryClickEvents() {
|
|||
|
||||
await ContentTask.spawn(tab.linkedBrowser, {}, async function() {
|
||||
let openLockwise = await ContentTaskUtils.waitForCondition(() => {
|
||||
// Opens an extra tab
|
||||
return content.document.getElementById("lockwise-link");
|
||||
}, "openLockwise exists");
|
||||
|
||||
|
@ -279,7 +282,11 @@ add_task(async function checkTelemetryClickEvents() {
|
|||
is(events.length, 1, `recorded telemetry for mtr_signup_button`);
|
||||
|
||||
await BrowserTestUtils.removeTab(tab);
|
||||
// We open two extra tabs with the click events.
|
||||
// We open three extra tabs with the click events.
|
||||
// 1. Monitor's "Viewed Saved Logins" link (goes to about:logins)
|
||||
// 2. Lockwise's "Turn on sync..." link (goes to about:preferences#sync)
|
||||
// 3. Lockwise's "Open Nightly" button (goes to about:logins)
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
|
|
@ -67,6 +67,15 @@ let RPMAccessManager = {
|
|||
"browser.contentblocking.report.lockwise.url",
|
||||
"browser.contentblocking.report.monitor.url",
|
||||
],
|
||||
getFormatURLPref: [
|
||||
"browser.contentblocking.report.monitor.how_it_works.url",
|
||||
"browser.contentblocking.report.lockwise.how_it_works.url",
|
||||
"browser.contentblocking.report.social.url",
|
||||
"browser.contentblocking.report.cookie.url",
|
||||
"browser.contentblocking.report.tracker.url",
|
||||
"browser.contentblocking.report.fingerprinter.url",
|
||||
"browser.contentblocking.report.cryptominer.url",
|
||||
],
|
||||
recordTelemetryEvent: ["yes"],
|
||||
},
|
||||
"about:newinstall": {
|
||||
|
|
Загрузка…
Ссылка в новой задаче