Create a gist now

Instantly share code, notes, and snippets.

@xem /readme.md
Last active Aug 29, 2015

What would you like to do?
A bookmarklet to fill any input with your e-mail

...or any text you often need to write in form fields.

Works with inputs, textareas and contenteditable elements.

Doesn't work on HTTPS on Firefox 23+.

javascript:(function(d){d=document.activeElement;if(d.tagName=="INPUT"||d.tagName=="TEXTAREA"||d.contentEditable=="true"){d.value=d.innerHTML="my_email@my_email_provider.com"}})()

Golfed:

javascript:with(document.activeElement)/INP|TEX/.test(tagName)|contentEditable=="true"?value=innerHTML="my_email@my_email_provider.com":0;null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment