mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-12-18 08:27:03 +02:00
commit
9aae135420
@ -151,6 +151,14 @@
|
||||
<div class="indeterminate"></div>
|
||||
</div></label>
|
||||
</div>
|
||||
<div style="text-align: right;">
|
||||
<button class="copy" data-clipboard-target="#textarea2" style="display: inline-block;">Copy text</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div style="text-align: right;">
|
||||
<input type="reset" style="display: inline-block;" value="🗑" title="Delete text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -239,7 +247,10 @@
|
||||
window.Prism = window.Prism || {};
|
||||
window.Prism.manual = true;
|
||||
</script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.22.0/prism.min.js" ></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.22.0/prism.min.js"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script>
|
||||
|
||||
<script>
|
||||
// API host/endpoint
|
||||
@ -435,6 +446,16 @@ document.addEventListener('DOMContentLoaded', function(){
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
var clipboard = new ClipboardJS('.copy');
|
||||
clipboard.on('success', function(e) {
|
||||
console.log('Done, text copied.');
|
||||
e.clearSelection();
|
||||
});
|
||||
clipboard.on('error', function(e) {
|
||||
console.log('Error: '+e);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user