- Add auto clipboard

This commit is contained in:
Vincent BRIDIER 2020-05-13 13:58:25 +02:00
parent a4e8068334
commit 9338ecdfcb

View file

@ -421,4 +421,17 @@
</div>
</div>
</div>
<script>
document.addEventListener('click', function (event) {
event.preventDefault();
if (event.target.type === 'text' || event.target.type === 'url') {
if (event.target.value.length > 0) {
event.target.select();
document.execCommand("copy");
//console.log(event.target.value);
}
}
}, false);
</script>
@endsection