diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-06 09:09:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-06 09:09:07 +0300 |
commit | 58bf06299d495bf460cc1c2c26dd57877958cd49 (patch) | |
tree | f6c5527ff2412ea067f5ab67006262c070223370 /app/views/shared/snippets | |
parent | eb52b43b9d89c66cfddef1f2b373033bec0bab0d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/shared/snippets')
-rw-r--r-- | app/views/shared/snippets/_embed.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/snippets/show.js.haml | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/app/views/shared/snippets/_embed.html.haml b/app/views/shared/snippets/_embed.html.haml index 5744fc9fba6..05fe307318f 100644 --- a/app/views/shared/snippets/_embed.html.haml +++ b/app/views/shared/snippets/_embed.html.haml @@ -14,8 +14,8 @@ .file-actions.d-none.d-sm-block .btn-group{ role: "group" }< + = embedded_copy_snippet_button(blob) = embedded_raw_snippet_button(@snippet, blob) - = embedded_snippet_download_button(@snippet, blob) %figure.file-holder.snippet-file-content{ "aria-label" => _('Code snippet') } = render 'projects/blob/viewer', viewer: blob.simple_viewer, load_async: false, external_embed: true 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))}'); |