mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-25 01:11:00 +00:00
commit
9aae135420
1 changed files with 24 additions and 3 deletions
|
@ -151,8 +151,16 @@
|
||||||
<div class="indeterminate"></div>
|
<div class="indeterminate"></div>
|
||||||
</div></label>
|
</div></label>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="text-align: right;">
|
||||||
|
<button class="copy" data-clipboard-target="#textarea2" style="display: inline-block;">Copy text</button>
|
||||||
|
</div>
|
||||||
</div>
|
</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>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -239,8 +247,11 @@
|
||||||
window.Prism = window.Prism || {};
|
window.Prism = window.Prism || {};
|
||||||
window.Prism.manual = true;
|
window.Prism.manual = true;
|
||||||
</script>
|
</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>
|
<script>
|
||||||
// API host/endpoint
|
// API host/endpoint
|
||||||
var BaseUrl = window.location.protocol + "//" + window.location.host;
|
var BaseUrl = window.location.protocol + "//" + window.location.host;
|
||||||
|
@ -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>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue