mirror of
https://github.com/Tygs/0bin.git
synced 2023-08-10 21:13:00 +03:00
allows quick-sending of email links. (#2)
This commit is contained in:
parent
f9e4f4acc0
commit
e584338776
@ -458,6 +458,29 @@ if (content && key) {
|
|||||||
bar.container.show();
|
bar.container.show();
|
||||||
bar.set('Decrypting paste...', '25%');
|
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,
|
zerobin.decrypt(key, content,
|
||||||
|
|
||||||
/* On error*/
|
/* On error*/
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
<div class="well paste-form">
|
<div class="well paste-form">
|
||||||
<form action="/" method="get" accept-charset="utf-8">
|
<form action="/" method="get" accept-charset="utf-8">
|
||||||
<p class="lnk-option">
|
<p class="lnk-option">
|
||||||
<a id="clip-button">Copy To Clipboard</a>
|
<a id="clip-button" href="#">Copy To Clipboard</a> |
|
||||||
|
|
<a id="short-url" href="#">Get short url</a> |
|
||||||
<a id="short-url" href=""
|
<a id="email-link" href="#"><i class="icon-share-alt"></i> Email</a>
|
||||||
target="_blank">Get short url</a>
|
|
||||||
<span class="paste-option btn-group top">
|
<span class="paste-option btn-group top">
|
||||||
<button class="btn btn-clone"><i class="icon-camera"></i> Clone</button>
|
<button class="btn btn-clone"><i class="icon-camera"></i> Clone</button>
|
||||||
<button class="btn">New Paste</button>
|
<button class="btn">New Paste</button>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user