Ignore TOTP icons if the field is too small

This commit is contained in:
varjolintu 2019-12-15 09:57:31 +02:00
parent 059d0ccf50
commit 5ec48c287b

View file

@ -1,5 +1,7 @@
'use strict';
const MINIMUM_SIZE = 60;
var kpxcTOTPIcons = {};
kpxcTOTPIcons.icons = [];
@ -25,7 +27,7 @@ class TOTPFieldIcon extends Icon {
};
TOTPFieldIcon.prototype.initField = function(field) {
if (!field || field.getAttribute('kpxc-totp-field') === 'true') {
if (!field || field.getAttribute('kpxc-totp-field') === 'true' || field.offsetWidth < MINIMUM_SIZE) {
return;
}