Theme Files Update
This commit is contained in:
parent
4cdbb6c7c7
commit
63d3658bb2
1 changed files with 5 additions and 1 deletions
|
@ -36,7 +36,11 @@
|
|||
var codeEl = containerEl.firstElementChild;
|
||||
copyBtn.addEventListener('click', function() {
|
||||
try {
|
||||
if(codeEl.firstElementChild instanceof HTMLTableElement) {
|
||||
var selection = selectText(codeEl.firstElementChild.firstElementChild.firstElementChild.lastElementChild);
|
||||
} else {
|
||||
var selection = selectText(codeEl);
|
||||
}
|
||||
document.execCommand('copy');
|
||||
selection.removeAllRanges();
|
||||
|
||||
|
|
Loading…
Reference in a new issue