How to paste password easily when pasting into password input fields disabled on Google Chrome

in Categories Howto, Linux News, Open Source, Programming last updated March 6, 2016

I use the gpass password manager to store my randomly generated unique password for each site. However, many sites such as net banking prevent you from pasting a password when signing up. The site owner or webmaster disables pasting into password input fields. Want to paste your password on such site? Give it a try to don’t f*ck with paste Google Chrome extension.

The pasting problem

From the project page:

It annoys me to no end when a web application prevents me from being able to paste content into an input field. If I paste an incorrect email address, that’s my own damn fault. I use tools like 1Password to remember all kinds of things for me, and it’s actually more error prone for me to type out all the characters than it is for me to copy from 1Password and paste into a text box.

Say hello to don’t f*ck with paste extension

This is a dead simple Google Chrome extension that removes paste blocking. The code is as follows:

var allowPaste = function(e){
  return true;
document.addEventListener('paste', allowPaste, true);

This code just allows the browser to accept all paste events, and skips any other paste event handlers. Pretty simple but effective solution.

Fig.01: Don't f*ck with paste
Fig.01: Don’t f*ck with paste


To allow pasting into password input fields on Google Chrome browser:

  1. Open the Google Chrome browser.
  2. Visit this URL
  3. Click on “+ADD TO CHROME” green color button.
  4. Now you can copy the password from your password manager (such as gpass, keeppass and more) and paste it on any site.

I hope this tiny and open source extension save some time and frustration. It worked on all of the sites that block pasting the password. These webmasters or site developers need to come up with user-friendly ways. Do not force us to type a random 50 character long password. The main reason many users try less secure and short password is stupid limitation added by developers. Security through obscurity is no security at all.

A note about Firefox users

You need to use about:config which is a feature of Mozilla applications which lists application settings (known as preferences) that are read from the profile files prefs.js and user.js, and from application defaults. The following hack enables the password paste. In Firefox a type about:config in the Location Bar:
If you see a page with the warning message, This might void your warranty!, click the button labeled “I’ll be careful, I promise!“, to continue. Type the following in search bar:
And set dom.event.clipboardevents.enabled value to false by double clicking on it.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Share this on (or read 3 comments/add one below):

3 comment

  1. Note: Google Sheets’s “Copy(Ctrl+C) & Paste(Ctrl+V)” will be no function if we change “dom.event.clipboardevents.enabled” to false in Firefox.

Comments are closed.