Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Will prompt to confirm mailto links.
Array.from(document.querySelectorAll('[href^="mailto:"]')).forEach(a => {
a.addEventListener('click', function(e) {
if (!confirm('Are you sure?')) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.