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); |
no this is not really a good idea. But it's been I think 3 or 4 yrs (at least 2 yrs) of chrome sitting on this bug of the designer not having the ability to change the style of an autofill field. Thus a hack is born.
This is where this hack (and code) originated from: http://code.google.com/p/chromium/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Pri%20Mstone%20ReleaseBlock%20OS%20Area%20Feature%20Status%20Owner%20Summary&groupby=&sort=&id=46543
@glideranderson
@kurtextrem
Is this possible ?
anttiviljami/browser-autofill-phishing#12
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So you could pratically log every autofill value? Not sure if good...