Standalone JavaScript that removes JavaScript/HTML restrictions blocking paste, edit, or autofill on input and textarea fields (e.g. password fields that block pasting).
This version is packaged as a bookmarklet — a bookmark you click to instantly run the script on whatever page you're viewing. No extension required.
- Show the bookmarks toolbar:
Ctrl+Shift+B(or right-click any toolbar → Bookmarks Toolbar). - Right-click the toolbar → New Bookmark…
- Name:
Restore Paste - Location: paste the code below exactly as-is.
- Click Save.
javascript:(function(){document.querySelectorAll('input, textarea').forEach(function(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!');})();
Note: Paste this into the bookmark's Location field in the dialog above — not directly into the address bar. Firefox strips
javascript:URLs typed/pasted straight into the URL bar as an anti-pastejacking safeguard, but the bookmark dialog is unaffected.
Navigate to any page with a stubborn paste-blocked field, then click Restore Paste in your bookmarks toolbar. Check the console for confirmation: All paste restrictions removed!
Unminified version, for reference:
(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!');
})();