Skip to content

Instantly share code, notes, and snippets.

@xem
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xem/9852ef14d076cd75a0b5 to your computer and use it in GitHub Desktop.
Save xem/9852ef14d076cd75a0b5 to your computer and use it in GitHub Desktop.
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