mirror of
https://codeberg.org/librewolf/source.git
synced 2024-12-22 05:33:03 -05:00
submit patch
This commit is contained in:
parent
3d668ace9a
commit
26fd58473b
2 changed files with 70 additions and 1 deletions
|
@ -7,8 +7,8 @@ patches/dbus_name.patch
|
|||
patches/devtools-bypass.patch
|
||||
patches/disable-data-reporting-at-compile-time.patch
|
||||
patches/flatpak-autoconf.patch
|
||||
patches/fullpage-translations.patch
|
||||
patches/fullpage-translations-customization.patch
|
||||
patches/fullpage-translations.patch
|
||||
patches/hide-passwordmgr.patch
|
||||
patches/librewolf-prefs.patch
|
||||
patches/mozilla_dirs.patch
|
||||
|
@ -18,6 +18,7 @@ patches/rust-gentoo-musl.patch
|
|||
patches/sed-patches/allow-searchengines-non-esr.patch
|
||||
patches/sed-patches/disable-pocket.patch
|
||||
patches/sed-patches/stop-undesired-requests.patch
|
||||
patches/ui-patches/allow_cookies_for_site.patch
|
||||
patches/ui-patches/firefox-view.patch
|
||||
patches/ui-patches/handlers.patch
|
||||
patches/ui-patches/hide-default-browser.patch
|
||||
|
|
68
patches/ui-patches/allow_cookies_for_site.patch
Normal file
68
patches/ui-patches/allow_cookies_for_site.patch
Normal file
|
@ -0,0 +1,68 @@
|
|||
diff --git a/browser/base/content/browser-siteIdentity.js b/browser/base/content/browser-siteIdentity.js
|
||||
index 4efbba2324..a35021b0c6 100644
|
||||
--- a/browser/base/content/browser-siteIdentity.js
|
||||
+++ b/browser/base/content/browser-siteIdentity.js
|
||||
@@ -414,6 +414,35 @@ var gIdentityHandler = {
|
||||
event.stopPropagation();
|
||||
},
|
||||
|
||||
+ /**
|
||||
+ * Handles clicks on the "ALLOW Cookies and Site Data" button.
|
||||
+ */
|
||||
+ async allowSiteData(event) {
|
||||
+ // Hide the popup before showing the removal prompt, to
|
||||
+ // avoid a pretty ugly transition. Also hide it even
|
||||
+ // if the update resulted in no site data, to keep the
|
||||
+ // illusion that clicking the button had an effect.
|
||||
+ let hidden = new Promise(c => {
|
||||
+ this._identityPopup.addEventListener("popuphidden", c, { once: true });
|
||||
+ });
|
||||
+ PanelMultiView.hidePopup(this._identityPopup);
|
||||
+ await hidden;
|
||||
+
|
||||
+ // Get base domain
|
||||
+ if (!this._uriHasHost) { return }
|
||||
+ let baseDomain = SiteDataManager.getBaseDomainFromHost(this._uri.host);
|
||||
+
|
||||
+ // Set variables and call addFromPrincipal()
|
||||
+ const type = 'cookie';
|
||||
+ const capability = Ci.nsIPermissionManager.ALLOW_ACTION;
|
||||
+ let uri = Services.io.newURI('https://' + baseDomain);
|
||||
+ let principal = Services.scriptSecurityManager.createContentPrincipal(uri,{});
|
||||
+ Services.perms.addFromPrincipal(principal, type, capability);
|
||||
+
|
||||
+ // Stop propagating the event and exit.
|
||||
+ event.stopPropagation();
|
||||
+ },
|
||||
+
|
||||
/**
|
||||
* Handler for mouseclicks on the "More Information" button in the
|
||||
* "identity-popup" panel.
|
||||
diff --git a/browser/components/controlcenter/content/identityPanel.inc.xhtml b/browser/components/controlcenter/content/identityPanel.inc.xhtml
|
||||
index 8bc64faa1e..0768ff1520 100644
|
||||
--- a/browser/components/controlcenter/content/identityPanel.inc.xhtml
|
||||
+++ b/browser/components/controlcenter/content/identityPanel.inc.xhtml
|
||||
@@ -96,6 +96,10 @@
|
||||
data-l10n-id="identity-clear-site-data"
|
||||
class="subviewbutton"
|
||||
oncommand="gIdentityHandler.clearSiteData(event);"/>
|
||||
+ <toolbarbutton id="identity-popup-allow-sitedata-button"
|
||||
+ data-l10n-id="identity-allow-site-data"
|
||||
+ class="subviewbutton"
|
||||
+ oncommand="gIdentityHandler.allowSiteData(event);"/>
|
||||
</vbox>
|
||||
</panelview>
|
||||
|
||||
diff --git a/browser/locales/en-US/browser/browser.ftl b/browser/locales/en-US/browser/browser.ftl
|
||||
index 0dbdc78eda..3ced42d39f 100644
|
||||
--- a/browser/locales/en-US/browser/browser.ftl
|
||||
+++ b/browser/locales/en-US/browser/browser.ftl
|
||||
@@ -402,6 +402,8 @@ identity-permissions-storage-access-learn-more = Learn more
|
||||
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…
|
||||
+identity-allow-site-data =
|
||||
+ .label = Allow cookies etc. (Save login info)
|
||||
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:
|
Loading…
Reference in a new issue