| 10371 | configCon.appendChild(saveBtn); |
| 10372 | saveBtn.style.display = "none"; |
| 10373 | const syncSaveBtnLayout = () => { |
| 10374 | if (!configCon || !saveBtn) return; |
| 10375 | const rect = configCon.getBoundingClientRect(); |
| 10376 | if (rect.width > 0) { |
| 10377 | document.documentElement.style.setProperty("--config-left", `${rect.left}px`); |
| 10378 | document.documentElement.style.setProperty("--config-width", `${rect.width}px`); |
| 10379 | saveBtn.style.display = ""; |
| 10380 | } else { |
| 10381 | saveBtn.style.display = "none"; |
| 10382 | } |
| 10383 | }; |
| 10384 | syncSaveBtnLayout(); |
| 10385 | window.addEventListener("resize", syncSaveBtnLayout); |
| 10386 | if (window.ResizeObserver) { |