Bug 1706425 - Simplify requestStorageAccess prompt. r=pbz,flod

Differential Revision: https://phabricator.services.mozilla.com/D121081
This commit is contained in:
Johann Hofmann 2021-08-17 10:19:21 +00:00
parent 2a15667bbd
commit 59d88af1cd
4 changed files with 17 additions and 19 deletions

View File

@ -984,15 +984,15 @@ midi.shareSysexWithSite = Allow %S to access your MIDI devices and send/receive
# popup panels, including the sliding subviews of the main menu.
panel.back = Back
storageAccess.Allow.label = Allow Access
storageAccess.Allow.accesskey = A
storageAccess.DontAllow.label = Block Access
storageAccess.DontAllow.accesskey = B
# LOCALIZATION NOTE (storageAccess3.message, storageAccess.hintText):
# %1$S and %3$S are both the name of the site URL (www.site1.example) trying to track the user's activity.
storageAccess1.Allow.label = Allow
storageAccess1.Allow.accesskey = A
storageAccess1.DontAllow.label = Block
storageAccess1.DontAllow.accesskey = B
# LOCALIZATION NOTE (storageAccess4.message, storageAccess1.hintText):
# %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.
storageAccess3.message = Will you allow %1$S to use cookies and site data on %2$S? Allowing this may let %3$S track what you do on this site.
storageAccess.hintText = You should block access if you dont trust or recognize %1$S.
storageAccess4.message = Allow %1$S to use its cookies on %2$S?
storageAccess1.hintText = You may want to block access if its not clear why %1$S needs this data.

View File

@ -1256,13 +1256,12 @@ StorageAccessPermissionPrompt.prototype = {
"third-party-cookies";
let hostPort = this.prettifyHostPort(this.principal.hostPort);
let hintText = gBrowserBundle.formatStringFromName(
"storageAccess.hintText",
"storageAccess1.hintText",
[hostPort]
);
return {
learnMoreURL,
displayURI: false,
name: hostPort,
hintText,
escAction: "secondarybuttoncommand",
};
@ -1277,10 +1276,9 @@ StorageAccessPermissionPrompt.prototype = {
},
get message() {
return gBrowserBundle.formatStringFromName("storageAccess3.message", [
"<>",
this.prettifyHostPort(this.topLevelPrincipal.hostPort),
return gBrowserBundle.formatStringFromName("storageAccess4.message", [
this.prettifyHostPort(this.principal.hostPort),
this.prettifyHostPort(this.topLevelPrincipal.hostPort),
]);
},
@ -1289,9 +1287,9 @@ StorageAccessPermissionPrompt.prototype = {
return [
{
label: gBrowserBundle.GetStringFromName("storageAccess.Allow.label"),
label: gBrowserBundle.GetStringFromName("storageAccess1.Allow.label"),
accessKey: gBrowserBundle.GetStringFromName(
"storageAccess.Allow.accesskey"
"storageAccess1.Allow.accesskey"
),
action: Ci.nsIPermissionManager.ALLOW_ACTION,
callback(state) {
@ -1300,10 +1298,10 @@ StorageAccessPermissionPrompt.prototype = {
},
{
label: gBrowserBundle.GetStringFromName(
"storageAccess.DontAllow.label"
"storageAccess1.DontAllow.label"
),
accessKey: gBrowserBundle.GetStringFromName(
"storageAccess.DontAllow.accesskey"
"storageAccess1.DontAllow.accesskey"
),
action: Ci.nsIPermissionManager.DENY_ACTION,
callback(state) {

View File

@ -732,7 +732,7 @@ popupnotificationcontent {
}
.popup-notification-checkbox {
margin-block: 8px 0;
margin-block: 12px 0;
}
.popup-notification-body-container {

View File

@ -216,5 +216,5 @@ popupnotification {
.popup-notification-learnmore-link {
text-decoration: underline;
margin-block: 0 8px;
margin-block: 4px 0;
}