mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Do toLowerCase() earlier so the value that is added to the table is consistent after page refresh. This also prevents duplicates with different casing from being added.
This commit is contained in:
parent
c98d7d8cf2
commit
e6f7c6c21f
1 changed files with 3 additions and 3 deletions
|
|
@ -500,7 +500,7 @@ options.initSitePreferences = function() {
|
|||
return;
|
||||
}
|
||||
|
||||
let value = manualUrl.value;
|
||||
let value = manualUrl.value.toLowerCase();
|
||||
|
||||
// Fills the last / char if needed. This ensures the compatibility with Match Patterns
|
||||
if (slashNeededForUrl(value)) {
|
||||
|
|
@ -522,14 +522,14 @@ options.initSitePreferences = function() {
|
|||
trClone.removeClass('clone d-none');
|
||||
|
||||
const tr = trClone.clone(true);
|
||||
tr.data('url', value.toLowerCase());
|
||||
tr.data('url', value);
|
||||
tr.attr('id', 'tr-scf' + newValue);
|
||||
tr.children('td:first').text(value);
|
||||
tr.children('td:nth-child(2)').children('select').val(IGNORE_NOTHING);
|
||||
$('#tab-site-preferences table tbody:first').append(tr);
|
||||
$('#tab-site-preferences table tbody:first tr.empty:first').hide();
|
||||
|
||||
options.settings['sitePreferences'].push({ url: value.toLowerCase(), ignore: IGNORE_NOTHING, usernameOnly: false });
|
||||
options.settings['sitePreferences'].push({ url: value, ignore: IGNORE_NOTHING, usernameOnly: false });
|
||||
options.saveSettings();
|
||||
manualUrl.value = '';
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue