1
0
mirror of https://github.com/Tygs/0bin.git synced 2023-08-10 21:13:00 +03:00

Improved error handling on emai link

This commit is contained in:
sam
2012-05-23 16:20:46 +02:00
parent 16f3e2e474
commit 72fc5d4646
5 changed files with 17 additions and 3 deletions

View File

@ -737,6 +737,19 @@ $("#force-coloration").live("click", function(e) {
$(this).remove();
});
/* Send the paste by email */
var emailLink = 'mailto:friend@example.com?body=' + window.location;
$('#email-link').attr('href', emailLink).bind('click', function(e){
$.get(emailLink).error(function(){
zerobin.message('error',
("You probably don't have one configured. Try " +
"<a href='https://www.mozilla.org/en-US/thunderbird/'>Thunderbird</a> or " +
"<a href='http://toolbar.google.com/gmail-helper/'>Gmail Notifier</a>" ),
'Cannot start your email client', true);
});
});
}); /* End of "document ready" jquery callback */

File diff suppressed because one or more lines are too long