mirror of
https://github.com/placeholder-soft/prodigyapi.git
synced 2026-01-12 17:02:55 +08:00
trim ending newline on copied code (#1296)
Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
function copyToClipboard(container) {
|
||||
const el = document.createElement('textarea');
|
||||
el.value = container.textContent;
|
||||
el.value = container.textContent.replace(/\n$/, '');
|
||||
document.body.appendChild(el);
|
||||
el.select();
|
||||
document.execCommand('copy');
|
||||
|
||||
Reference in New Issue
Block a user