summaryrefslogtreecommitdiffstats
path: root/web_src/js/index.js
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2022-11-21 10:59:42 +0100
committerGitHub <noreply@github.com>2022-11-21 17:59:42 +0800
commitc2fb27beb4a0f9a9ad1478937439bcf4c43aff4a (patch)
tree0f690c4aeecb6caa0a8cb24623141f3e569b8e72 /web_src/js/index.js
parente4eaa68a2b2355c7333406fdcbb8b118677b95df (diff)
downloadgitea-c2fb27beb4a0f9a9ad1478937439bcf4c43aff4a.tar.gz
gitea-c2fb27beb4a0f9a9ad1478937439bcf4c43aff4a.zip
Improvements for Content Copy (#21842)
It now supports copying Markdown, SVG and Images (not in Firefox currently because of lacking [`ClipboardItem`](https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem) support, but can be enabled in `about:config` and works). It will fetch the data if in a rendered view or when it's an image. Followup to https://github.com/go-gitea/gitea/pull/21629.
Diffstat (limited to 'web_src/js/index.js')
-rw-r--r--web_src/js/index.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js
index a829deaf11..f4638a60e0 100644
--- a/web_src/js/index.js
+++ b/web_src/js/index.js
@@ -89,6 +89,7 @@ import {initRepoWikiForm} from './features/repo-wiki.js';
import {initRepoCommentForm, initRepository} from './features/repo-legacy.js';
import {initFormattingReplacements} from './features/formatting.js';
import {initMcaptcha} from './features/mcaptcha.js';
+import {initCopyContent} from './features/copycontent.js';
// Run time-critical code as soon as possible. This is safe to do because this
// script appears at the end of <body> and rendered HTML is accessible at that point.
@@ -136,6 +137,7 @@ $(document).ready(() => {
initStopwatch();
initTableSort();
initFindFileInRepo();
+ initCopyContent();
initAdminCommon();
initAdminEmails();