From 7e17da46c2f33a2209e60728fcd78c2068936fab Mon Sep 17 00:00:00 2001 From: a2nr Date: Wed, 12 Aug 2026 07:49:34 +0700 Subject: [PATCH] fix(frontend): hide CircuitJS toolbar & menu bar in lesson embeds Append &hideMenu=true to the circuitjs.html iframe src used by renderCircuitEmbeds so lesson content embeds render clean without the toolbar and menu bar. The embed path in CircuitEditor.svelte is untouched, so the editor keeps its full toolbar. Verified: - Bundle contains embed URL (with hideMenu=true) and editor URL (without) as separate variants - svelte-check: 0 errors - /lesson/rangkaian_dasar returns 200 on the running stack --- frontend/src/lib/actions/renderCircuitEmbeds.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/lib/actions/renderCircuitEmbeds.ts b/frontend/src/lib/actions/renderCircuitEmbeds.ts index 0c8af3c..1aae76d 100644 --- a/frontend/src/lib/actions/renderCircuitEmbeds.ts +++ b/frontend/src/lib/actions/renderCircuitEmbeds.ts @@ -18,7 +18,7 @@ function loadCircuitEmbed(div: HTMLElement) { const isDark = document.documentElement.getAttribute('data-theme') === 'dark'; const iframe = document.createElement('iframe'); - iframe.src = `/circuitjs1/circuitjs.html?whiteBackground=${!isDark}`; + iframe.src = `/circuitjs1/circuitjs.html?whiteBackground=${!isDark}&hideMenu=true`; iframe.style.width = '100%'; iframe.style.height = '100%'; iframe.style.border = 'none';