We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc385dc commit 7cd16aeCopy full SHA for 7cd16ae
web_src/js/features/common-global.js
@@ -345,8 +345,10 @@ export function initGlobalButtons() {
345
});
346
347
// get raw text for copy content button
348
+ const copyContentButtons = document.querySelectorAll('button.copy-content');
349
+ if (copyContentButtons.length == 0) return;
350
const text = Array.from(document.querySelectorAll('.lines-code')).map((el) => el.textContent).join('');
- for (const copyContentButton of document.querySelectorAll('button.copy-content')) {
351
+ for (const copyContentButton of copyContentButtons) {
352
copyContentButton.setAttribute('data-clipboard-text', text);
353
}
354
0 commit comments