-
-
Save nuxero/6dda1287ccfb91999e9f8c42d7246fd3 to your computer and use it in GitHub Desktop.
Paste Enabler, remove attributes from form text fields that restrict copy and paste operations. Tested to be working on many financial websites, though on some it causes duplication (workaround: undo).
This file contains hidden or 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
javascript:s=document.createElement('script');s.type='text/javascript';document.body.appendChild(s);s.src='https://goo.gl/ZKgsbZ';void(0); |
This file contains hidden or 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
attrs = ["onpaste", "oncopy", "onfocus", "onblur", "onkeyup", "onkeydown", "onkeypress", "ondrag", "ondrop", "onclick", "onmousemove", "onmouseout", "onmouseover", "onchange"]; | |
for (var i = 0; i< attrs.length; ++i) { | |
var it = document.evaluate("//input[string-length(@"+attrs[i]+")!=0 and (@type='text' or @type='password')]" , document, null, XPathResult.ANY_TYPE , null ); | |
var l = []; var t; | |
while (t = it.iterateNext()) { | |
l.push(t); | |
}; | |
for (t in l) { | |
for (var j = 0; j < attrs.length; ++j ) { | |
l[t].removeAttribute(attrs[j]); | |
} | |
} | |
}; | |
undefined; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment