From a9aa9f84f820da6042a1d7f36c7f4c5f4373a018 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sat, 2 Nov 2024 14:48:37 +0100 Subject: [PATCH] workspace saving: hide div#saveworkspace instead of only hidding submit button when JS is on --- src/fn/fn.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/fn/fn.js b/src/fn/fn.js index 0bde7f6a..ff09e001 100644 --- a/src/fn/fn.js +++ b/src/fn/fn.js @@ -91,11 +91,9 @@ export function initWorkspaceForm() { for (const input of inputs) { input.oninput = workspaceChanged; } - let submits = form.querySelectorAll('[type="submit"]'); - for (const submit of submits) { - if (submit instanceof HTMLElement) { - submit.style.display = 'none'; - } + let saveworkspace = document.getElementById('save-workspace'); + if (saveworkspace instanceof HTMLElement) { + saveworkspace.style.display = 'none'; } form.addEventListener('submit', function(event) {