mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Add icon offset exception to Royal Bank Canada (#2356)
Add icon offset exception to Royal Bank Canada
This commit is contained in:
parent
4792d44af8
commit
3f4825cc4c
2 changed files with 9 additions and 6 deletions
|
|
@ -210,14 +210,17 @@ kpxcSites.popupExceptionFound = function(combinations) {
|
|||
|
||||
/**
|
||||
* Handles a few exceptions for certain sites where Username Icon is not placed properly.
|
||||
* @param {number} left Absolute left position of the icon
|
||||
* @param {number} top Absolute top position of the icon
|
||||
* @param {number} iconSize Size of the icon
|
||||
* @returns {array} New left and top values as an Array
|
||||
* @param {number} left Absolute left position of the icon
|
||||
* @param {number} top Absolute top position of the icon
|
||||
* @param {number} iconSize Size of the icon
|
||||
* @param {string} inputType Input field type
|
||||
* @returns {array} New left and top values as an Array
|
||||
*/
|
||||
kpxcSites.iconOffset = function(left, top, iconSize) {
|
||||
kpxcSites.iconOffset = function(left, top, iconSize, inputType) {
|
||||
if (document.location.hostname.includes('idmsa.apple.com')) {
|
||||
return [ left - (iconSize + 10), top + 3 ];
|
||||
} else if (document.location.origin === 'https://secure.royalbank.com' && inputType === 'password') {
|
||||
return [ left - (iconSize + 10), top ];
|
||||
}
|
||||
|
||||
return undefined;
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ kpxcUI.setIconPosition = function(icon, field, rtl = false, segmented = false) {
|
|||
}
|
||||
|
||||
// Adjusts the icon offset for certain sites
|
||||
const iconOffset = kpxcSites.iconOffset(left, top, size);
|
||||
const iconOffset = kpxcSites.iconOffset(left, top, size, field?.getLowerCaseAttribute('type'));
|
||||
if (iconOffset) {
|
||||
left = iconOffset[0];
|
||||
top = iconOffset[1];
|
||||
|
|
|
|||
Loading…
Reference in a new issue