diff options
Diffstat (limited to 'app/views/shared/snippets/show.js.haml')
-rw-r--r-- | app/views/shared/snippets/show.js.haml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/views/shared/snippets/show.js.haml b/app/views/shared/snippets/show.js.haml index 23cebc97f63..f61f162be10 100644 --- a/app/views/shared/snippets/show.js.haml +++ b/app/views/shared/snippets/show.js.haml @@ -1,2 +1,3 @@ +function copyToClipboard(queryEl) { const copyText = document.querySelector(queryEl).textContent; navigator.clipboard.writeText(copyText); } document.write('#{escape_javascript(stylesheet_link_tag("#{stylesheet_url 'snippets'}"))}'); document.write('#{escape_javascript(render(partial: 'shared/snippets/embed', collection: @blobs, as: :blob))}'); |