diff options
author | varjolintu <sami.vanttinen@protonmail.com> | 2022-03-31 06:57:30 +0300 |
---|---|---|
committer | varjolintu <sami.vanttinen@protonmail.com> | 2022-03-31 06:57:30 +0300 |
commit | 7a1ade977d7d6b29ce4d36b1f8de059e9633ef33 (patch) | |
tree | d309245581c6d6a667a71fd5da217b6ecc86faeb | |
parent | 066cdec7328c15aea089ac177d63dc6923ca840b (diff) |
-rw-r--r-- | keepassxc-browser/common/sites.js | 5 | ||||
-rw-r--r-- | keepassxc-browser/content/ui.js | 9 |
2 files changed, 7 insertions, 7 deletions
diff --git a/keepassxc-browser/common/sites.js b/keepassxc-browser/common/sites.js index 2517d88..742f0be 100644 --- a/keepassxc-browser/common/sites.js +++ b/keepassxc-browser/common/sites.js @@ -183,9 +183,8 @@ kpxcSites.popupExceptionFound = function(combinations) { * @param {number} iconSize Size of the icon * @returns {array} New left and top values as an Array */ -kpxcSites.iconExceptionFound = function(left, top, iconSize) { - if (document.location.hostname.includes('idmsa.apple.com')) - { +kpxcSites.iconOffset = function(left, top, iconSize) { + if (document.location.hostname.includes('idmsa.apple.com')) { return [ left - (iconSize + 10), top + 3 ]; } diff --git a/keepassxc-browser/content/ui.js b/keepassxc-browser/content/ui.js index 7a480c5..15223ef 100644 --- a/keepassxc-browser/content/ui.js +++ b/keepassxc-browser/content/ui.js @@ -130,10 +130,11 @@ kpxcUI.setIconPosition = function(icon, field, rtl = false, segmented = false) { left += size + 10; } - const iconException = kpxcSites.iconExceptionFound(left, top, size); - if (iconException) { - left = iconException[0]; - top = iconException[1]; + // Adjusts the icon offset for certain sites + const iconOffset = kpxcSites.iconOffset(left, top, size); + if (iconOffset) { + left = iconOffset[0]; + top = iconOffset[1]; } const scrollTop = document.scrollingElement ? document.scrollingElement.scrollTop : 0; |