javascript override of browser styles.

This commit is contained in:
2025-04-13 17:56:19 -06:00
parent b39b75412d
commit 3dfb443f36
3 changed files with 71 additions and 52 deletions
+16
View File
@@ -0,0 +1,16 @@
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);
});
});