0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-01-25 02:00:54 +01:00

rename var

This commit is contained in:
silverwind 2025-12-17 21:03:46 +01:00
parent f45185dcae
commit f29f63a390
No known key found for this signature in database
GPG Key ID: 2E62B41C93869443

View File

@ -53,12 +53,12 @@ function isMonospaceEnabled() {
}
/** Apply font to the provided or all textareas on the page and optionally save on localStorage */
function applyMonospace(monospaceEnabled: boolean, {textarea, save}: {textarea?: HTMLTextAreaElement, save?: boolean}) {
function applyMonospace(enabled: boolean, {textarea, save}: {textarea?: HTMLTextAreaElement, save?: boolean}) {
for (const el of textarea ? [textarea] : document.querySelectorAll('.markdown-text-editor')) {
el.classList.toggle('tw-font-mono', monospaceEnabled);
el.classList.toggle('tw-font-mono', enabled);
}
if (save) {
localStorage.setItem('markdown-editor-monospace', String(monospaceEnabled));
localStorage.setItem('markdown-editor-monospace', String(enabled));
}
}