mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Fix Save Domain Only option with Credential Banner
This commit is contained in:
parent
45834d610c
commit
a77c57a89d
1 changed files with 6 additions and 7 deletions
|
|
@ -273,7 +273,9 @@ kpxcForm.onSubmit = async function(e) {
|
|||
}
|
||||
|
||||
await kpxc.setPasswordFilled(true);
|
||||
await sendMessage('page_set_submitted', [ true, usernameValue, passwordValue, trimURL(window.top.location.href), kpxc.credentials ]);
|
||||
|
||||
const url = trimURL(kpxc.settings.saveDomainOnlyNewCreds ? window.top.location.origin : window.top.location.href);
|
||||
await sendMessage('page_set_submitted', [ true, usernameValue, passwordValue, url, kpxc.credentials ]);
|
||||
|
||||
// Show the banner if the page does not reload
|
||||
kpxc.rememberCredentials(usernameValue, passwordValue);
|
||||
|
|
@ -1213,12 +1215,9 @@ kpxc.rememberCredentials = async function(usernameValue, passwordValue, urlValue
|
|||
}
|
||||
|
||||
const getUrl = function() {
|
||||
let url = kpxc.settings.saveDomainOnlyNewCreds ? document.location.origin : document.location.href;
|
||||
if (url.indexOf('?') > 0) {
|
||||
url = url.substring(0, url.indexOf('?'));
|
||||
if (url.length < document.location.origin.length) {
|
||||
url = document.location.origin;
|
||||
}
|
||||
let url = trimURL(kpxc.settings.saveDomainOnlyNewCreds ? document.location.origin : document.location.href);
|
||||
if (url.length < document.location.origin.length) {
|
||||
url = document.location.origin;
|
||||
}
|
||||
|
||||
return url;
|
||||
|
|
|
|||
Loading…
Reference in a new issue