17 lines
422 B
JavaScript
17 lines
422 B
JavaScript
document.addEventListener('DOMContentLoaded', function() {
|
|
let inputs = document.querySelectorAll('input');
|
|
|
|
inputs.forEach(input => {
|
|
if (input.matches(':-webkit-autofill')) {
|
|
input.classList.add('autofilled');
|
|
}
|
|
|
|
function apply_hover(el) {
|
|
input.classList.add('autofilled');
|
|
}
|
|
|
|
input.addEventListener('hover', apply_hover);
|
|
input.addEventListener('focus', apply_hover);
|
|
});
|
|
});
|