mariordev / mailtoui

A simple way to enhance your mailto links with a convenient user interface.
https://mailtoui.com
MIT License
192 stars 12 forks source link

Missing var declaration for toggleCopyButton function #20

Open francoismajor opened 4 years ago

francoismajor commented 4 years ago

This returns an error. (button is not defined) The function still works, but 'Copied!' text is not displayed.

https://github.com/mariordev/mailtoui/blob/1be162bdd3d964c3ad61a8423884640b95d33da5/src/js/mailtoui.js#L874 https://github.com/mariordev/mailtoui/blob/1be162bdd3d964c3ad61a8423884640b95d33da5/src/js/mailtoui.js#L875

Simple fix: var button = document.getElementById(t.prefix('-button-copy')); var buttonText = document.getElementById(t.prefix('-button-text-copy'));

janogarcia commented 4 years ago

Just ran into the same issue today, when executing mailtoui under strict mode.

Fixed it here. Let me know if you want me to submit a pull request. 👍

mariordev commented 4 years ago

Hi @janogarcia, Thank you for letting me know. No need to submit a pr, I'll get this fix in as soon as I can. Thanks!

mariordev commented 4 years ago

Hi @francoismajor, thanks for pointing this out! I'll get this fix in as soon as I can.