- Add auto clipboard
This commit is contained in:
parent
a4e8068334
commit
9338ecdfcb
1 changed files with 13 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue