]> source.dussan.org Git - gitea.git/commit
Replace clipboard.js with async clipboard api (#15899)
authorsilverwind <me@silverwind.io>
Sun, 30 May 2021 19:15:57 +0000 (21:15 +0200)
committerGitHub <noreply@github.com>
Sun, 30 May 2021 19:15:57 +0000 (20:15 +0100)
commit37205039fc83707edc8079d0884d4c12953e80b1
treeff4adbd4ce4f6f56c5166758e2e21144d91faa1f
parent36dce0e457d99ae22530f606ce296ef4946b257b
Replace clipboard.js with async clipboard api (#15899)

Use async clipboard api [1] over this dependency, saving around 10kB
bundle size before minify while delivering the same functionality.

The issue comment button works but does not have a popup indication. We
could add some toast-style notifications in the future to fix that but I
think it's out of scope of this PR.

[1] https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText
package-lock.json
package.json
templates/repo/clone_buttons.tmpl
templates/repo/issue/view_content/context_menu.tmpl
web_src/js/features/clipboard.js