mirror of
https://github.com/Tygs/0bin.git
synced 2023-08-10 21:13:00 +03:00
minimal javascript to automatically open up an email message (tested and works in chrome,ff when a mailto client is available.)
This commit is contained in:
parent
e584338776
commit
60ddbf49c6
@ -458,29 +458,6 @@ if (content && key) {
|
||||
bar.container.show();
|
||||
bar.set('Decrypting paste...', '25%');
|
||||
|
||||
/* Pop up a form to enter an email address to quickly
|
||||
send the encrypted link. */
|
||||
$('#email-link').click(function(e){
|
||||
e.preventDefault();
|
||||
var submitLink = $('<a />', {'href':'#', 'class':'btn btn-small'})
|
||||
.attr('title', 'Starts a new email in your default client')
|
||||
.html("<i class='icon-share-alt'></i>");
|
||||
var emailInput = $('<input />', {
|
||||
'type': 'text',
|
||||
'class': 'input-small',
|
||||
'placeholder': 'Email'
|
||||
}).change(function(){
|
||||
var emailTxt = $(this).val();
|
||||
if(emailTxt) {
|
||||
submitLink.attr('href', 'mailto:' + emailTxt + '?subject=0bin%20Message&body='+window.location.toString());
|
||||
}
|
||||
});
|
||||
$('<span />', {'class': 'form-inline'})
|
||||
.append(emailInput)
|
||||
.append(submitLink)
|
||||
.insertAfter($(this).hide());
|
||||
});
|
||||
|
||||
zerobin.decrypt(key, content,
|
||||
|
||||
/* On error*/
|
||||
|
@ -24,7 +24,7 @@
|
||||
<p class="lnk-option">
|
||||
<a id="clip-button" href="#">Copy To Clipboard</a> |
|
||||
<a id="short-url" href="#">Get short url</a> |
|
||||
<a id="email-link" href="#"><i class="icon-share-alt"></i> Email</a>
|
||||
<a id="email-link" href="#" onclick="this.href='mailto:friend@example.com?body='+window.location">Email</a>
|
||||
|
||||
<span class="paste-option btn-group top">
|
||||
<button class="btn btn-clone"><i class="icon-camera"></i> Clone</button>
|
||||
|
Loading…
Reference in New Issue
Block a user