Added code for custom button

Would love to get this into the main repo--let me know if you have questions. Thanks!