diff --git a/.eslintrc b/.eslintrc index 7c17ba3..a70cebe 100644 --- a/.eslintrc +++ b/.eslintrc @@ -120,6 +120,7 @@ "IGNORE_FULL": "readonly", "IGNORE_NORMAL": "readonly", "IGNORE_NOTHING": "readonly", + "IGNORE_PASSKEYS": "readonly", "importScripts": "readonly", "IMPROVED_DETECTION_PREDEFINED_SITELIST": "readonly", "initColorTheme": "readonly", diff --git a/keepassxc-browser/_locales/en/messages.json b/keepassxc-browser/_locales/en/messages.json index 7b55fe0..4b7d52b 100644 --- a/keepassxc-browser/_locales/en/messages.json +++ b/keepassxc-browser/_locales/en/messages.json @@ -1118,8 +1118,8 @@ "message": "Page URL", "description": "Site Preferences list column title." }, - "optionsColumnIgnore": { - "message": "Ignore", + "optionsColumnFeatures": { + "message": "Features", "description": "Site Preferences list column title." }, "optionsColumnUsernameOnly": { @@ -1150,6 +1150,10 @@ "message": "Disable Auto-Submit", "description": "Site Preferences option selection." }, + "optionsSelectionPasskeys": { + "message": "Disable passkeys", + "description": "Site Preferences option selection." + }, "optionsSelectionFull": { "message": "Disable all features", "description": "Site Preferences option selection." diff --git a/keepassxc-browser/background/page.js b/keepassxc-browser/background/page.js index 06d7880..a29d5c6 100755 --- a/keepassxc-browser/background/page.js +++ b/keepassxc-browser/background/page.js @@ -335,14 +335,15 @@ page.fillHttpAuth = async function(tab, credentials) { } }; -page.isSiteIgnored = async function(tab, currentLocation) { +page.isSiteIgnored = async function(tab, args = []) { + const [ currentLocation, checkPasskeys ] = args; if (!page?.settings?.sitePreferences || !currentLocation) { return false; } for (const site of page.settings.sitePreferences) { if (siteMatch(site.url, currentLocation) || site.url === currentLocation) { - if (site.ignore === IGNORE_FULL) { + if (site.ignore === IGNORE_FULL || (checkPasskeys && site.ignore === IGNORE_PASSKEYS)) { return true; } } diff --git a/keepassxc-browser/common/global.js b/keepassxc-browser/common/global.js index 86edb80..9a4865f 100755 --- a/keepassxc-browser/common/global.js +++ b/keepassxc-browser/common/global.js @@ -6,6 +6,7 @@ const EXTENSION_NAME = 'KeePassXC-Browser'; const IGNORE_NOTHING = 'ignoreNothing'; const IGNORE_NORMAL = 'ignoreNormal'; const IGNORE_AUTOSUBMIT = 'ignoreAutoSubmit'; +const IGNORE_PASSKEYS = 'ignorePasskeys'; const IGNORE_FULL = 'ignoreFull'; // Credential sorting options diff --git a/keepassxc-browser/content/passkeys-inject.js b/keepassxc-browser/content/passkeys-inject.js index f9e3dc0..4813f85 100644 --- a/keepassxc-browser/content/passkeys-inject.js +++ b/keepassxc-browser/content/passkeys-inject.js @@ -99,7 +99,7 @@ const initContent = async () => { return; } - if (await chrome.runtime.sendMessage({ action: 'is_site_ignored', args: window.self.location.href })) { + if (await chrome.runtime.sendMessage({ action: 'is_site_ignored', args: [ window.self.location.href, true ] })) { console.log('This site is ignored in Site Preferences.'); return; } diff --git a/keepassxc-browser/options/options.html b/keepassxc-browser/options/options.html index 0ef3fc9..fac6d67 100644 --- a/keepassxc-browser/options/options.html +++ b/keepassxc-browser/options/options.html @@ -762,7 +762,7 @@ - + @@ -798,6 +798,7 @@ +