Forked from cofyc/reenable_password_pasting.user.js
Last active
August 29, 2015 14:12
-
-
Save xiaoda/32d155aa3b1ebdf72e2f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Re-enable password pasting | |
// @namespace http://yechengfu.com | |
// @version 0.1 | |
// @description Re-enable password pasting. | |
// @author Yecheng Fu | |
// @match https://accounts.ctrip.com/* | |
// @grant none | |
// @refer http://prioritized.net/blog/re-enabling-password-pasting-on-annoying-web-forms/ | |
// ==/UserScript== | |
var inputs = document.getElementsByTagName('input'); | |
for (var i=0; i < inputs.length; i++) { | |
if (inputs[i].getAttribute('type').toLowerCase() === 'password') { | |
inputs[i].setAttribute('onpaste', ''); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment