зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1601784 - Use a built-in "Learn More" link instead of custom nodes for the storage access prompt. r=ewright
Differential Revision: https://phabricator.services.mozilla.com/D56553 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
5adcd32e48
Коммит
3292e920dc
|
@ -117,18 +117,3 @@
|
|||
</vbox>
|
||||
</popupnotificationfooter>
|
||||
</popupnotification>
|
||||
|
||||
<popupnotification id="storage-access-notification" hidden="true">
|
||||
<popupnotificationcontent class="storage-access-notification-content">
|
||||
<xul:vbox flex="1">
|
||||
<!-- These need to be on the same line to avoid creating
|
||||
whitespace between them (whitespace is added in the
|
||||
localization file, if necessary). -->
|
||||
<xul:description class="storage-access-perm-text"><html:span
|
||||
id="storage-access-perm-label"/><html:a id="storage-access-perm-learnmore"
|
||||
onclick="openTrustedLinkIn(this.href, 'tab'); return false;"
|
||||
class="text-link popup-notification-learnmore-link"/><html:span
|
||||
id="storage-access-perm-endlabel"/></xul:description>
|
||||
</xul:vbox>
|
||||
</popupnotificationcontent>
|
||||
</popupnotification>
|
||||
|
|
|
@ -1022,17 +1022,10 @@ storageAccess.AllowOnAnySite.label = Allow access on any site
|
|||
storageAccess.AllowOnAnySite.accesskey = w
|
||||
storageAccess.DontAllow.label = Block Access
|
||||
storageAccess.DontAllow.accesskey = B
|
||||
# LOCALIZATION NOTE (storageAccess.message):
|
||||
# LOCALIZATION NOTE (storageAccess2.message):
|
||||
# %1$S is the name of the site URL (www.site1.example) trying to track the user's activity.
|
||||
# %2$S is the name of the site URL (www.site2.example) that the user is visiting. This is the same domain name displayed in the address bar.
|
||||
storageAccess.message = Will you give %1$S access to track your browsing activity on %2$S?
|
||||
# LOCALIZATION NOTE (storageAccess.description.label):
|
||||
# %1$S is the name of the site URL (www.site1.example) trying to track the user's activity.
|
||||
# %2$S will be replaced with the localized version of storageAccess.description.learnmore. This text will be converted into a hyper-link linking to the SUMO page explaining the concept of third-party trackers.
|
||||
storageAccess.description.label = You may want to block %1$S on this site if you don’t recognize or trust it. Learn more about %2$S
|
||||
# LOCALIZATION NOTE (storageAccess.description.learnmore):
|
||||
# The value of this string is embedded inside storageAccess.description.label. See the localization note for storageAccess.description.label.
|
||||
storageAccess.description.learnmore = third-party trackers
|
||||
storageAccess2.message = Will you allow %1$S to track your browsing activity on %2$S?
|
||||
|
||||
confirmationHint.sendToDevice.label = Sent!
|
||||
confirmationHint.copyURL.label = Copied to clipboard!
|
||||
|
|
|
@ -1178,7 +1178,11 @@ StorageAccessPermissionPrompt.prototype = {
|
|||
},
|
||||
|
||||
get popupOptions() {
|
||||
let learnMoreURL =
|
||||
Services.urlFormatter.formatURLPref("app.support.baseURL") +
|
||||
"third-party-cookies";
|
||||
return {
|
||||
learnMoreURL,
|
||||
displayURI: false,
|
||||
name: this.prettifyHostPort(this.principal.URI),
|
||||
secondName: this.prettifyHostPort(this.topLevelPrincipal.URI),
|
||||
|
@ -1186,35 +1190,6 @@ StorageAccessPermissionPrompt.prototype = {
|
|||
};
|
||||
},
|
||||
|
||||
onShown() {
|
||||
let document = this.browser.ownerDocument;
|
||||
let label = gBrowserBundle.formatStringFromName(
|
||||
"storageAccess.description.label",
|
||||
[this.prettifyHostPort(this.request.principal.URI), "<>"]
|
||||
);
|
||||
let parts = label.split("<>");
|
||||
if (parts.length == 1) {
|
||||
parts.push("");
|
||||
}
|
||||
let map = {
|
||||
"storage-access-perm-label": parts[0],
|
||||
"storage-access-perm-learnmore": gBrowserBundle.GetStringFromName(
|
||||
"storageAccess.description.learnmore"
|
||||
),
|
||||
"storage-access-perm-endlabel": parts[1],
|
||||
};
|
||||
for (let id in map) {
|
||||
let str = map[id];
|
||||
document.getElementById(id).textContent = str;
|
||||
}
|
||||
let learnMoreURL =
|
||||
Services.urlFormatter.formatURLPref("app.support.baseURL") +
|
||||
"third-party-cookies";
|
||||
document.getElementById(
|
||||
"storage-access-perm-learnmore"
|
||||
).href = learnMoreURL;
|
||||
},
|
||||
|
||||
get notificationID() {
|
||||
return "storage-access";
|
||||
},
|
||||
|
@ -1224,7 +1199,7 @@ StorageAccessPermissionPrompt.prototype = {
|
|||
},
|
||||
|
||||
get message() {
|
||||
return gBrowserBundle.formatStringFromName("storageAccess.message", [
|
||||
return gBrowserBundle.formatStringFromName("storageAccess2.message", [
|
||||
"<>",
|
||||
"{}",
|
||||
]);
|
||||
|
|
Загрузка…
Ссылка в новой задаче