diff options
author | zrose584 <57181548+zrose584@users.noreply.github.com> | 2022-07-30 17:37:29 +0200 |
---|---|---|
committer | Jesus <jesus.estupinan@pragma.com.co> | 2022-08-07 02:52:39 +0800 |
commit | 7d767ff9ce77391e11c60b7cae6c1d41d93d6a04 (patch) | |
tree | b74303740c7f98c0c5ca53762c533fb80244a13d /youtube/static/js/common.js | |
parent | 65e7d85549935e862dfddc1c17fb4ed0c2d609ef (diff) | |
download | yt-local-7d767ff9ce77391e11c60b7cae6c1d41d93d6a04.tar.lz yt-local-7d767ff9ce77391e11c60b7cae6c1d41d93d6a04.tar.xz yt-local-7d767ff9ce77391e11c60b7cae6c1d41d93d6a04.zip |
copyTextToClipboard: support fullscreen
Diffstat (limited to 'youtube/static/js/common.js')
-rw-r--r-- | youtube/static/js/common.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube/static/js/common.js b/youtube/static/js/common.js index 79f8834..599d578 100644 --- a/youtube/static/js/common.js +++ b/youtube/static/js/common.js @@ -94,7 +94,8 @@ function copyTextToClipboard(text) { textArea.value = text; - document.body.appendChild(textArea); + let parent_el = video.parentElement; + parent_el.appendChild(textArea); textArea.focus(); textArea.select(); @@ -106,7 +107,7 @@ function copyTextToClipboard(text) { console.log('Oops, unable to copy'); } - document.body.removeChild(textArea); + parent_el.removeChild(textArea); } |