2023-12-04 14:36:22 -05:00
|
|
|
diff --git a/browser/base/content/browser-siteIdentity.js b/browser/base/content/browser-siteIdentity.js
|
2023-12-05 17:22:30 -05:00
|
|
|
index 4efbba2..1bc6b5b 100644
|
2023-12-04 14:36:22 -05:00
|
|
|
--- a/browser/base/content/browser-siteIdentity.js
|
|
|
|
+++ b/browser/base/content/browser-siteIdentity.js
|
2023-12-05 17:22:30 -05:00
|
|
|
@@ -414,6 +414,33 @@ var gIdentityHandler = {
|
2023-12-04 14:36:22 -05:00
|
|
|
event.stopPropagation();
|
|
|
|
},
|
|
|
|
|
2023-12-05 17:22:30 -05:00
|
|
|
+ async refreshSiteData() {
|
|
|
|
+ document.getElementById("identity-popup-allow-sitedata-toggle").setAttribute(
|
|
|
|
+ "pressed",
|
|
|
|
+ Services.perms.testExactPermissionFromPrincipal(
|
|
|
|
+ gBrowser.contentPrincipal,
|
|
|
|
+ "cookie"
|
|
|
|
+ ) === Services.perms.ALLOW_ACTION
|
|
|
|
+ );
|
|
|
|
+ },
|
2023-12-04 14:36:22 -05:00
|
|
|
+
|
2023-12-05 17:22:30 -05:00
|
|
|
+ async toggleSiteData() {
|
|
|
|
+ const pressed = document.getElementById("identity-popup-allow-sitedata-toggle").toggleAttribute(
|
|
|
|
+ "pressed"
|
|
|
|
+ );
|
2023-12-04 14:36:22 -05:00
|
|
|
+
|
2023-12-05 17:22:30 -05:00
|
|
|
+ if (pressed) {
|
|
|
|
+ Services.perms.addFromPrincipal(
|
|
|
|
+ gBrowser.contentPrincipal,
|
|
|
|
+ "cookie",
|
|
|
|
+ Services.perms.ALLOW_ACTION,
|
|
|
|
+ Services.perms.EXPIRE_NEVER
|
|
|
|
+ );
|
|
|
|
+ } else {
|
|
|
|
+ Services.perms.removeFromPrincipal(gBrowser.contentPrincipal, "cookie");
|
|
|
|
+ }
|
2023-12-04 14:36:22 -05:00
|
|
|
+ },
|
|
|
|
+
|
|
|
|
/**
|
|
|
|
* Handler for mouseclicks on the "More Information" button in the
|
|
|
|
* "identity-popup" panel.
|
2023-12-05 17:22:30 -05:00
|
|
|
@@ -1151,6 +1178,8 @@ var gIdentityHandler = {
|
|
|
|
this._identityPopupContentOwner.textContent = owner;
|
|
|
|
this._identityPopupContentSupp.textContent = supplemental;
|
|
|
|
this._identityPopupContentVerif.textContent = verifier;
|
|
|
|
+
|
|
|
|
+ this.refreshSiteData();
|
|
|
|
},
|
|
|
|
|
|
|
|
setURI(uri) {
|
2023-12-04 14:36:22 -05:00
|
|
|
diff --git a/browser/components/controlcenter/content/identityPanel.inc.xhtml b/browser/components/controlcenter/content/identityPanel.inc.xhtml
|
2023-12-05 17:22:30 -05:00
|
|
|
index 8bc64fa..4a4a1af 100644
|
2023-12-04 14:36:22 -05:00
|
|
|
--- a/browser/components/controlcenter/content/identityPanel.inc.xhtml
|
|
|
|
+++ b/browser/components/controlcenter/content/identityPanel.inc.xhtml
|
2023-12-05 17:22:30 -05:00
|
|
|
@@ -96,6 +96,12 @@
|
2023-12-04 14:36:22 -05:00
|
|
|
data-l10n-id="identity-clear-site-data"
|
|
|
|
class="subviewbutton"
|
|
|
|
oncommand="gIdentityHandler.clearSiteData(event);"/>
|
|
|
|
+ <toolbarbutton id="identity-popup-allow-sitedata-button"
|
|
|
|
+ class="subviewbutton"
|
2023-12-05 17:22:30 -05:00
|
|
|
+ oncommand="gIdentityHandler.toggleSiteData();">
|
|
|
|
+ <label data-l10n-id="identity-allow-site-data" flex="1"></label>
|
|
|
|
+ <html:moz-toggle id="identity-popup-allow-sitedata-toggle" style="pointer-events: none;"></html:moz-toggle>
|
|
|
|
+ </toolbarbutton>
|
2023-12-04 14:36:22 -05:00
|
|
|
</vbox>
|
|
|
|
</panelview>
|
|
|
|
|
|
|
|
diff --git a/browser/locales/en-US/browser/browser.ftl b/browser/locales/en-US/browser/browser.ftl
|
2023-12-05 17:22:30 -05:00
|
|
|
index 0dbdc78..e183f1a 100644
|
2023-12-04 14:36:22 -05:00
|
|
|
--- a/browser/locales/en-US/browser/browser.ftl
|
|
|
|
+++ b/browser/locales/en-US/browser/browser.ftl
|
2023-12-05 17:22:30 -05:00
|
|
|
@@ -402,6 +402,7 @@ identity-permissions-storage-access-learn-more = Learn more
|
2023-12-04 14:36:22 -05:00
|
|
|
identity-permissions-reload-hint = You may need to reload the page for changes to apply.
|
|
|
|
identity-clear-site-data =
|
|
|
|
.label = Clear cookies and site data…
|
2023-12-05 17:22:30 -05:00
|
|
|
+identity-allow-site-data = LibreWolf: Always store cookies/data for this site
|
2023-12-04 14:36:22 -05:00
|
|
|
identity-connection-not-secure-security-view = You are not securely connected to this site.
|
|
|
|
identity-connection-verified = You are securely connected to this site.
|
|
|
|
identity-ev-owner-label = Certificate issued to:
|