Refs #12 - Shorten url before to actually send a mail

This commit is contained in:
Rémy HUBSCHER 2013-01-19 18:29:43 +01:00
parent 303905aff5
commit 82ea02a60c
1 changed files with 6 additions and 2 deletions

View File

@ -745,8 +745,12 @@ $("#force-coloration").live("click", function(e) {
});
/* Send the paste by email */
var emailLink = 'mailto:friend@example.com?body=' + window.location;
$('#email-link').attr('href', emailLink);
$('#email-link').click(function() {
zerobin.getTinyURL(window.location.toString(), function(tinyurl) {
window.open('mailto:friend@example.com?body=' + tinyurl);
});
return false;
});