mirror of
https://github.com/status-im/status-site-legacy.git
synced 2025-02-11 06:36:34 +00:00
add copy to clipboard on input click
This commit is contained in:
parent
a659dea180
commit
824c0b8855
@ -88,7 +88,7 @@ $(function() {
|
||||
fade: {
|
||||
crossFade: true
|
||||
}
|
||||
});
|
||||
});
|
||||
var swiper2 = new Swiper('.swiper2', {
|
||||
loop: true,
|
||||
autoplay: 2000,
|
||||
@ -108,6 +108,22 @@ $(function() {
|
||||
setTimeout(function(){
|
||||
$('#maitre-field-email input').focus();
|
||||
},1000);
|
||||
});
|
||||
});
|
||||
var shareLinkInput = $("#shareLinkInput");
|
||||
|
||||
shareLinkInput.click(function(test) {
|
||||
shareLinkInput.focus();
|
||||
console.log(shareLinkInput);
|
||||
console.log(test);
|
||||
shareLinkInput[0].setSelectionRange(0, shareLinkInput.val().length);
|
||||
try {
|
||||
succeeded = document.execCommand('copy');
|
||||
} catch (err) {
|
||||
succeeded = false;
|
||||
}
|
||||
if (!succeeded) {
|
||||
// Browser doesn't support execCommand
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user