diff --git a/keepassxc-browser/_locales/en/messages.json b/keepassxc-browser/_locales/en/messages.json index fd64dd8..eea0505 100644 --- a/keepassxc-browser/_locales/en/messages.json +++ b/keepassxc-browser/_locales/en/messages.json @@ -775,6 +775,14 @@ "message": "When saving new custom login fields, save only the domain instead of full URL.", "description": "Save domain only option help text." }, + "optionsDownloadFaviconAfterSave": { + "message": "Download favicon after save", + "description": "Download favicon after save checkbox label text." + }, + "optionsDownloadFaviconAfterSaveHelpText": { + "message": "Favicon will be automatically downloaded for the new credential.", + "description": "Download favicon after save help text." + }, "optionsAutoFillAndSendHelpText": { "message": "If credentials are found for a page and the login-type is an HTTP Basic Auth request, KeePassXC-Browser tries to login automatically with the first given credentials. When multiple credentials are present, the extension popup can be used to choose the correct one. Even when this feature is enabled, it is still possible to enter HTTP Basic Auth login manually.", "description": "Auto-Fill And Send option help text." diff --git a/keepassxc-browser/background/keepass.js b/keepassxc-browser/background/keepass.js index e7183bd..e8b0d73 100755 --- a/keepassxc-browser/background/keepass.js +++ b/keepassxc-browser/background/keepass.js @@ -191,6 +191,10 @@ keepass.updateCredentials = async function(tab, args = []) { messageData.uuid = entryId; } + if (!entryId && page.settings.downloadFaviconAfterSave) { + messageData.downloadFavicon = 'true'; + } + if (group && groupUuid) { messageData.group = group; messageData.groupUuid = groupUuid; diff --git a/keepassxc-browser/background/page.js b/keepassxc-browser/background/page.js index 8b1eaf4..17a6f5b 100755 --- a/keepassxc-browser/background/page.js +++ b/keepassxc-browser/background/page.js @@ -14,6 +14,7 @@ const defaultSettings = { credentialSorting: SORT_BY_GROUP_AND_TITLE, defaultGroup: '', defaultGroupAlwaysAsk: false, + downloadFaviconAfterSave: false, redirectAllowance: 1, saveDomainOnly: true, showLoginFormIcon: true, @@ -101,6 +102,10 @@ page.initSettings = async function() { page.settings.defaultGroupAlwaysAsk = defaultSettings.defaultGroupAlwaysAsk; } + if (!('downloadFaviconAfterSave' in page.settings)) { + page.settings.downloadFaviconAfterSave = defaultSettings.downloadFaviconAfterSave; + } + if (!('redirectAllowance' in page.settings)) { page.settings.redirectAllowance = defaultSettings.redirectAllowance; } diff --git a/keepassxc-browser/options/options.html b/keepassxc-browser/options/options.html index 4dbc7cf..03724b8 100644 --- a/keepassxc-browser/options/options.html +++ b/keepassxc-browser/options/options.html @@ -253,6 +253,15 @@ + +