tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 4d7d7f53ab6d78f27dd6b038ed0a7549378c5476
parent 1a93ed7f998b4e4f826a1261ce604359bfac1ffe
Author: Dre Grant <dgrant@mozilla.com>
Date:   Fri, 19 Dec 2025 20:09:54 +0000

Bug 2005782 - Add option to report content requiring payment or subscription in the new tab page, r=home-newtab-reviewers,fluent-reviewers,bolsson,mconley

Differential Revision: https://phabricator.services.mozilla.com/D276287

Diffstat:
Mbrowser/extensions/newtab/bin/render-activity-stream-html.js | 5+++++
Mbrowser/extensions/newtab/content-src/components/DiscoveryStreamComponents/ReportContent/ReportContent.jsx | 13+++++++++++++
Mbrowser/extensions/newtab/content-src/components/DiscoveryStreamComponents/ReportContent/ReportContent.scss | 2+-
Mbrowser/extensions/newtab/css/activity-stream.css | 2+-
Mbrowser/extensions/newtab/data/content/abouthomecache/page.html.template | 1+
Mbrowser/extensions/newtab/data/content/activity-stream.bundle.js | 12+++++++++++-
Mbrowser/extensions/newtab/prerendered/activity-stream-debug.html | 5+++++
Mbrowser/extensions/newtab/prerendered/activity-stream-noscripts.html | 5+++++
Mbrowser/extensions/newtab/prerendered/activity-stream.html | 5+++++
Mbrowser/locales/en-US/browser/newtab/newtab.ftl | 5++++-
Mtoolkit/modules/RemotePageAccessManager.sys.mjs | 2++
11 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/browser/extensions/newtab/bin/render-activity-stream-html.js b/browser/extensions/newtab/bin/render-activity-stream-html.js @@ -141,6 +141,11 @@ function templateHTML(options) { type="module" src="chrome://global/content/elements/panel-list.js" ></script> + <script + async + type="module" + src="chrome://global/content/elements/moz-support-link.mjs" + ></script> </body> </html> `.trimLeft(); diff --git a/browser/extensions/newtab/content-src/components/DiscoveryStreamComponents/ReportContent/ReportContent.jsx b/browser/extensions/newtab/content-src/components/DiscoveryStreamComponents/ReportContent/ReportContent.jsx @@ -228,6 +228,19 @@ export const ReportContent = spocs => { data-l10n-id="newtab-report-content-spam-misleading" value="spam_or_misleading" ></moz-radio> + <moz-radio + data-l10n-id="newtab-report-content-requires-payment-subscription" + value="requires_payment_or_subscription" + > + <a + slot="support-link" + is="moz-support-link" + support-page="recommendations-firefox-new-tab#w_what-is-a-paywall" + data-l10n-id="newtab-report-content-requires-payment-subscription-learn-more" + rel="noreferrer" + target="_blank" + ></a> + </moz-radio> </moz-radio-group> </> )} diff --git a/browser/extensions/newtab/content-src/components/DiscoveryStreamComponents/ReportContent/ReportContent.scss b/browser/extensions/newtab/content-src/components/DiscoveryStreamComponents/ReportContent/ReportContent.scss @@ -1,6 +1,6 @@ .report-content-form { width: 500px; - height: 230px; + height: 270px; box-shadow: var(--box-shadow-level-4); border-radius: var(--border-radius-medium); border: 1px solid var(--border-color); diff --git a/browser/extensions/newtab/css/activity-stream.css b/browser/extensions/newtab/css/activity-stream.css @@ -8758,7 +8758,7 @@ dialog:dir(rtl)::after { .report-content-form { width: 500px; - height: 230px; + height: 270px; box-shadow: var(--box-shadow-level-4); border-radius: var(--border-radius-medium); border: 1px solid var(--border-color); diff --git a/browser/extensions/newtab/data/content/abouthomecache/page.html.template b/browser/extensions/newtab/data/content/abouthomecache/page.html.template @@ -52,5 +52,6 @@ <script async type="module" src="chrome://global/content/elements/moz-select.mjs"></script> <script async type="module" src="chrome://global/content/elements/moz-reorderable-list.mjs"></script> <script async type="module" src="chrome://global/content/elements/panel-list.js"></script> + <script async type="module" src="chrome://global/content/elements/moz-support-link.mjs"></script> </body> </html> diff --git a/browser/extensions/newtab/data/content/activity-stream.bundle.js b/browser/extensions/newtab/data/content/activity-stream.bundle.js @@ -5438,7 +5438,17 @@ const ReportContent = spocs => { }), /*#__PURE__*/external_React_default().createElement("moz-radio", { "data-l10n-id": "newtab-report-content-spam-misleading", value: "spam_or_misleading" - }))), /*#__PURE__*/external_React_default().createElement("moz-button-group", null, /*#__PURE__*/external_React_default().createElement("moz-button", { + }), /*#__PURE__*/external_React_default().createElement("moz-radio", { + "data-l10n-id": "newtab-report-content-requires-payment-subscription", + value: "requires_payment_or_subscription" + }, /*#__PURE__*/external_React_default().createElement("a", { + slot: "support-link", + is: "moz-support-link", + "support-page": "recommendations-firefox-new-tab#w_what-is-a-paywall", + "data-l10n-id": "newtab-report-content-requires-payment-subscription-learn-more", + rel: "noreferrer", + target: "_blank" + })))), /*#__PURE__*/external_React_default().createElement("moz-button-group", null, /*#__PURE__*/external_React_default().createElement("moz-button", { "data-l10n-id": "newtab-report-cancel", onClick: handleCancel, className: "cancel-report-btn" diff --git a/browser/extensions/newtab/prerendered/activity-stream-debug.html b/browser/extensions/newtab/prerendered/activity-stream-debug.html @@ -95,5 +95,10 @@ type="module" src="chrome://global/content/elements/panel-list.js" ></script> + <script + async + type="module" + src="chrome://global/content/elements/moz-support-link.mjs" + ></script> </body> </html> diff --git a/browser/extensions/newtab/prerendered/activity-stream-noscripts.html b/browser/extensions/newtab/prerendered/activity-stream-noscripts.html @@ -85,5 +85,10 @@ type="module" src="chrome://global/content/elements/panel-list.js" ></script> + <script + async + type="module" + src="chrome://global/content/elements/moz-support-link.mjs" + ></script> </body> </html> diff --git a/browser/extensions/newtab/prerendered/activity-stream.html b/browser/extensions/newtab/prerendered/activity-stream.html @@ -95,5 +95,10 @@ type="module" src="chrome://global/content/elements/panel-list.js" ></script> + <script + async + type="module" + src="chrome://global/content/elements/moz-support-link.mjs" + ></script> </body> </html> diff --git a/browser/locales/en-US/browser/newtab/newtab.ftl b/browser/locales/en-US/browser/newtab/newtab.ftl @@ -505,7 +505,7 @@ newtab-download-mobile-highlight-image = newtab-shortcuts-highlight-title = Your favorites at your fingertips newtab-shortcuts-highlight-subtitle = Add a shortcut to keep your favorite sites one click away. -## Strings for reporting ads and content +## Strings for reporting issues with ads and content newtab-report-content-why-reporting-this = .label = Why are you reporting this? @@ -523,6 +523,9 @@ newtab-report-content-inappropriate-offensive = .label = Inappropriate or offensive newtab-report-content-spam-misleading = .label = Spam or misleading +newtab-report-content-requires-payment-subscription = + .label = Requires payment or subscription +newtab-report-content-requires-payment-subscription-learn-more = Learn more newtab-report-cancel = Cancel newtab-report-submit = Submit newtab-toast-thanks-for-reporting = diff --git a/toolkit/modules/RemotePageAccessManager.sys.mjs b/toolkit/modules/RemotePageAccessManager.sys.mjs @@ -62,6 +62,7 @@ export let RemotePageAccessManager = { "about:home": { RPMSendAsyncMessage: ["ActivityStream:ContentToMain"], RPMAddMessageListener: ["ActivityStream:MainToContent"], + RPMGetFormatURLPref: ["app.support.baseURL"], }, "about:httpsonlyerror": { RPMGetFormatURLPref: ["app.support.baseURL"], @@ -126,6 +127,7 @@ export let RemotePageAccessManager = { "about:newtab": { RPMSendAsyncMessage: ["ActivityStream:ContentToMain"], RPMAddMessageListener: ["ActivityStream:MainToContent"], + RPMGetFormatURLPref: ["app.support.baseURL"], }, "about:privatebrowsing": { RPMSendAsyncMessage: [