summaryrefslogtreecommitdiffstats
path: root/web_src/js/markup
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2021-10-21 15:37:43 +0800
committerGitHub <noreply@github.com>2021-10-21 15:37:43 +0800
commit2add8fe9beede4aa82c913fcb70c0cf5bb1c6185 (patch)
treebe2555d0a8f0ae926d56eefd3a3b3e533985074a /web_src/js/markup
parent5879ab83b5fab57a71aed4c8b3c4d9293b4a4398 (diff)
downloadgitea-2add8fe9beede4aa82c913fcb70c0cf5bb1c6185.tar.gz
gitea-2add8fe9beede4aa82c913fcb70c0cf5bb1c6185.zip
Frontend refactor, PascalCase to camelCase, remove unused code (#17365)
* Frontend refactor, PascalCase to camelCase, remove unused code * fix
Diffstat (limited to 'web_src/js/markup')
-rw-r--r--web_src/js/markup/mermaid.js6
-rw-r--r--web_src/js/markup/tasklist.js2
2 files changed, 4 insertions, 4 deletions
diff --git a/web_src/js/markup/mermaid.js b/web_src/js/markup/mermaid.js
index 0319cbb6f0..f9f069ed1e 100644
--- a/web_src/js/markup/mermaid.js
+++ b/web_src/js/markup/mermaid.js
@@ -1,4 +1,4 @@
-const {MermaidMaxSourceCharacters} = window.config;
+const {mermaidMaxSourceCharacters} = window.config;
function displayError(el, err) {
el.closest('pre').classList.remove('is-loading');
@@ -26,8 +26,8 @@ export async function renderMermaid(els) {
});
for (const el of els) {
- if (MermaidMaxSourceCharacters >= 0 && el.textContent.length > MermaidMaxSourceCharacters) {
- displayError(el, new Error(`Mermaid source of ${el.textContent.length} characters exceeds the maximum allowed length of ${MermaidMaxSourceCharacters}.`));
+ if (mermaidMaxSourceCharacters >= 0 && el.textContent.length > mermaidMaxSourceCharacters) {
+ displayError(el, new Error(`Mermaid source of ${el.textContent.length} characters exceeds the maximum allowed length of ${mermaidMaxSourceCharacters}.`));
continue;
}
diff --git a/web_src/js/markup/tasklist.js b/web_src/js/markup/tasklist.js
index ea1a1f824a..f8ca5b0406 100644
--- a/web_src/js/markup/tasklist.js
+++ b/web_src/js/markup/tasklist.js
@@ -47,7 +47,7 @@ export function initMarkupTasklist() {
await $.post(updateUrl, {
ignore_attachments: true,
- _csrf: window.config.csrf,
+ _csrf: window.config.csrfToken,
content: newContent,
context
});