Created
September 19, 2012 17:53
-
-
Save glideranderson/3751098 to your computer and use it in GitHub Desktop.
Chrome hack to remove yellow autofill fields, but retain value
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
# hack to not show Chrome's yellow background on autofill form fields | |
if navigator.userAgent.toLowerCase().indexOf("chrome") >= 0 | |
$(window).load -> | |
$('input:-webkit-autofill').each -> | |
$field = $(@) | |
parent = $field.closest '.control-group' | |
text = $field.val() | |
name = $field.attr 'name' | |
$field.after(this.outerHTML).remove() | |
parent.find("input[name='#{name}']").val(text); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@glideranderson
@kurtextrem
Is this possible ?
anttiviljami/browser-autofill-phishing#12