From 0ea0745d197e2e1c8f81bec578185658776f5273 Mon Sep 17 00:00:00 2001 From: AKORA <65976562+A-K-O-R-A@users.noreply.github.com> Date: Mon, 7 Oct 2024 14:31:34 +0200 Subject: [PATCH] Change site preferences table layout --- keepassxc-browser/options/options.html | 92 ++++++++++++++++++-------- keepassxc-browser/options/options.js | 34 +++++----- 2 files changed, 83 insertions(+), 43 deletions(-) diff --git a/keepassxc-browser/options/options.html b/keepassxc-browser/options/options.html index 5eb2cb3..6da319a 100644 --- a/keepassxc-browser/options/options.html +++ b/keepassxc-browser/options/options.html @@ -737,14 +737,6 @@ - - - - - - - - @@ -752,26 +744,72 @@ - - - - - - - - - - - +
+ + + + +
+ + +
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+
+ +
+
+ + +
+
+
+ +
+
+ + +
+
+
+ + +
diff --git a/keepassxc-browser/options/options.js b/keepassxc-browser/options/options.js index dc4794d..a012deb 100644 --- a/keepassxc-browser/options/options.js +++ b/keepassxc-browser/options/options.js @@ -575,22 +575,24 @@ options.initSitePreferences = function() { const row = rowClone.cloneNode(true); row.setAttribute('url', url); row.setAttribute('id', 'tr-scf' + newIndex); - row.children[0].textContent = url; - row.children[1].children[0].value = ignore; - row.children[1].children[0].addEventListener('change', selectionChanged); - row.children[2].children['usernameOnly'].checked = usernameOnly; - row.children[2].children['usernameOnly'].addEventListener('change', checkboxClicked); - row.children[3].children['improvedFieldDetection'].checked = improvedFieldDetection; - row.children[3].children['improvedFieldDetection'].addEventListener('change', checkboxClicked); - row.children[4].children['allowIframes'].checked = allowIframes; - row.children[4].children['allowIframes'].addEventListener('change', checkboxClicked); - row.children[5].children['autoSubmit'].checked = autoSubmit; - row.children[5].children['autoSubmit'].addEventListener('change', checkboxClicked); - row.children[6].children['autoFillCredentials'].checked = autoFillCredentials; - row.children[6].children['autoFillCredentials'].addEventListener('change', checkboxClicked); - row.children[7].children['autoFillTOTP'].checked = autoFillTOTP; - row.children[7].children['autoFillTOTP'].addEventListener('change', checkboxClicked); - row.children[8].addEventListener('click', removeButtonClicked); + + const details = row.children[0].children[0]; + details.children[0].children[0].textContent = url; + details.children[2].children[0].value = ignore; + details.children[2].children[0].addEventListener('change', selectionChanged); + details.querySelector('#usernameOnly').checked = usernameOnly; + details.querySelector('#usernameOnly').addEventListener('change', checkboxClicked); + details.querySelector('#improvedFieldDetection').checked = improvedFieldDetection; + details.querySelector('#improvedFieldDetection').addEventListener('change', checkboxClicked); + details.querySelector('#allowIframes').checked = allowIframes; + 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.children[8].addEventListener('click', removeButtonClicked); $('#tab-site-preferences table tbody').append(row); };