From 122b706350fd3813f2a830c5b454971df273f4ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lera=20Elvo=C3=A9?= Date: Mon, 15 Dec 2025 19:56:54 +0300 Subject: [PATCH] remove spaces from babycode html emoji, clean up js --- app/lib/babycode.py | 2 +- data/static/js/babycode-editor.js | 1 - data/static/js/thread.js | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/lib/babycode.py b/app/lib/babycode.py index 33931e7..36663fa 100644 --- a/app/lib/babycode.py +++ b/app/lib/babycode.py @@ -238,7 +238,7 @@ NAMED_COLORS = [ def make_emoji(name, code): - return f' {name}' + return f'{name}' EMOJI = { diff --git a/data/static/js/babycode-editor.js b/data/static/js/babycode-editor.js index 5258ff7..a095c12 100644 --- a/data/static/js/babycode-editor.js +++ b/data/static/js/babycode-editor.js @@ -23,7 +23,6 @@ if (inThread()) { const form = ta.closest('.post-edit-form'); - console.log(ta.closest('.post-edit-form')); if (form){ form.addEventListener("submit", () => { localStorage.removeItem(window.location.pathname); diff --git a/data/static/js/thread.js b/data/static/js/thread.js index f283a6e..113d5b0 100644 --- a/data/static/js/thread.js +++ b/data/static/js/thread.js @@ -97,7 +97,7 @@ if (ta.value.trim() !== "") { ta.value += "\n" } - ta.value += `@${authorUsername} [url=${postPermalink}]said:[/url]\n[quote]< :scissors: > ${document.getSelection().toString()} < :scissors: >[/quote]\n`; + ta.value += `@${authorUsername} [url=${postPermalink}]said:[/url]\n[quote]<:scissors:> ${document.getSelection().toString()} <:scissors:>[/quote]\n`; ta.scrollIntoView() ta.focus();