Created
February 9, 2021 12:27
-
-
Save klinkby/3656d75bf6ba1376c78e0988a6638522 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="da-DK"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body> | |
<div> | |
<textarea id="emails"></textarea> | |
<button id="doMail"></button> | |
</div> | |
<script>//<![CDATA[ | |
(function() { | |
var emails = "", emailsEl = document.getElementById("emails"), doMail = document.getElementById("doMail"); | |
for(var i=200;i>0;i--) { | |
emails += "mail" + i + "@example.com;" | |
} | |
emailsEl.textContent = emails; | |
doMail.textContent = emails.length; | |
doMail.addEventListener("click", function () { | |
var SKIFaktaboksAfNavn = "12.34 Hønseringe", emails = emailsEl.textContent; | |
navigator.clipboard.writeText(emails); | |
window.location.href = "mailto:" + encodeURIComponent(emails) + "?cc=kundeservice@ski.dk&subject=Vedr.: " + encodeURIComponent(SKIFaktaboksAfNavn); | |
}); | |
})(); | |
//]]></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment