Standalone JavaScript function that removes JavaScript and HTML restrictions that block pasting, editing, or autofilling text fields (like email or password inputs) on a web page.
(function() {
document.querySelectorAll('input, textarea').forEach(el => {
el.removeAttribute('onpaste');
el.onpaste = null;
el.removeAttribute('readonly');
el.removeAttribute('disabled');
el.addEventListener('paste', function(e) {
e.stopImmediatePropagation();
}, true);
});
console.log('All paste restrictions removed!');
})();