Rename sitePrefrence property names to match the matching global setting property names

This commit is contained in:
AKORA 2024-10-08 10:18:03 +02:00
parent ba21fe292b
commit 2653cdbe3e
4 changed files with 17 additions and 17 deletions

View file

@ -503,7 +503,7 @@ kpxc.prepareCredentials = async function() {
}
if (kpxc.credentials.length === 1) {
if (kpxc.preferencesForPage?.autoFillCredentials || kpxc.settings.autoFillSingleEntry) {
if (kpxc.preferencesForPage?.autoFillSingleEntry || kpxc.settings.autoFillSingleEntry) {
kpxcFill.fillFromAutofill();
return;
}

View file

@ -106,7 +106,7 @@ class TOTPFieldIcon extends Icon {
// Fill TOTP automatically if option is enabled
TOTPFieldIcon.prototype.autoFillSingleTotp = async function(field) {
if (kpxc.preferencesForPage?.autoFillTOTP || kpxc.settings.autoFillSingleTotp) {
if (kpxc.preferencesForPage?.autoFillSingleTotp || kpxc.settings.autoFillSingleTotp) {
if (kpxc.credentials.length === 0) {
await kpxc.receiveCredentialsIfNecessary();
}

View file

@ -798,16 +798,16 @@
<div class="form-group">
<div class="form-check">
<label for="autoFillCredentials" data-i18n="optionsCheckboxAutoFillSingleEntry"></label>
<input class="form-check-input" type="checkbox" id="autoFillCredentials" name="autoFillCredentials" value="false" data-i18n="[title]optionsColumnAutoFillCredentials">
<label for="autoFillSingleEntry" data-i18n="optionsCheckboxAutoFillSingleEntry"></label>
<input class="form-check-input" type="checkbox" id="autoFillSingleEntry" name="autoFillSingleEntry" value="false" data-i18n="[title]optionsColumnautoFillSingleEntry">
<div class="form-text" data-i18n="optionsAutoFillSingleEntryHelpText"></div>
</div>
</div>
<div class="form-group">
<div class="form-check">
<label for="autoFillTOTP" data-i18n="optionsCheckboxAutoFillSingleTotp"></label>
<input class="form-check-input" type="checkbox" id="autoFillTOTP" name="autoFillTOTP" value="false" data-i18n="[title]optionsColumnAutoFillTOTP">
<label for="autoFillSingleTotp" data-i18n="optionsCheckboxAutoFillSingleTotp"></label>
<input class="form-check-input" type="checkbox" id="autoFillSingleTotp" name="autoFillSingleTotp" value="false" data-i18n="[title]optionsColumnautoFillSingleTotp">
<div class="form-text" data-i18n="optionsAutoFillSingleTotpHelpText"></div>
</div>
</div>

View file

@ -547,10 +547,10 @@ options.initSitePreferences = function() {
site.allowIframes = this.checked;
} else if (this.name === 'autoSubmit') {
site.autoSubmit = this.checked;
} else if (this.name === 'autoFillCredentials') {
site.autoFillCredentials = this.checked;
} else if (this.name === 'autoFillTOTP') {
site.autoFillTOTP = this.checked;
} else if (this.name === 'autoFillSingleEntry') {
site.autoFillSingleEntry = this.checked;
} else if (this.name === 'autoFillSingleTotp') {
site.autoFillSingleTotp = this.checked;
}
}
}
@ -571,7 +571,7 @@ options.initSitePreferences = function() {
options.saveSettings();
};
const addNewRow = function(rowClone, newIndex, url, ignore, usernameOnly, improvedFieldDetection, allowIframes, autoSubmit, autoFillCredentials, autoFillTOTP) {
const addNewRow = function(rowClone, newIndex, url, ignore, usernameOnly, improvedFieldDetection, allowIframes, autoSubmit, autoFillSingleEntry, autoFillSingleTotp) {
const row = rowClone.cloneNode(true);
row.setAttribute('url', url);
row.setAttribute('id', 'tr-scf' + newIndex);
@ -588,10 +588,10 @@ options.initSitePreferences = function() {
details.querySelector('#allowIframes').addEventListener('change', checkboxClicked);
details.querySelector('#autoSubmit').checked = autoSubmit;
details.querySelector('#autoSubmit').addEventListener('change', checkboxClicked);
details.querySelector('#autoFillCredentials').checked = autoFillCredentials;
details.querySelector('#autoFillCredentials').addEventListener('change', checkboxClicked);
details.querySelector('#autoFillTOTP').checked = autoFillTOTP;
details.querySelector('#autoFillTOTP').addEventListener('change', checkboxClicked);
details.querySelector('#autoFillSingleEntry').checked = autoFillSingleEntry;
details.querySelector('#autoFillSingleEntry').addEventListener('change', checkboxClicked);
details.querySelector('#autoFillSingleTotp').checked = autoFillSingleTotp;
details.querySelector('#autoFillSingleTotp').addEventListener('change', checkboxClicked);
details.querySelector('#deleteButton').addEventListener('click', removeButtonClicked);
$('#tab-site-preferences #sitePreferencesTable').append(row);
@ -682,8 +682,8 @@ options.initSitePreferences = function() {
site.improvedFieldDetection,
site.allowIframes,
site.autoSubmit,
site.autoFillCredentials,
site.autoFillTOTP,
site.autoFillSingleEntry,
site.autoFillSingleTotp,
);
++counter;
}