diff --git a/preview/playground b/preview/playground index edb0414..20c98d1 160000 --- a/preview/playground +++ b/preview/playground @@ -1 +1 @@ -Subproject commit edb0414c1abd7ec557af1512d60b0cffcbcb8cdd +Subproject commit 20c98d1d5ee0e809ed0cebd01e58d0814d899b1b diff --git a/preview/webview.css b/preview/webview.css index c45e341..1a761b7 100644 --- a/preview/webview.css +++ b/preview/webview.css @@ -8,7 +8,7 @@ body { flex-direction: column; } -#schematic { +.schematic { height: 100%; flex-grow: 1; } diff --git a/preview/webview.html b/preview/webview.html index 6e0f127..1584935 100644 --- a/preview/webview.html +++ b/preview/webview.html @@ -10,32 +10,36 @@ - -
- + +
+
- - - - + + + + -
+
-
- +
+
-
+
-
+
Loading...
-
+
diff --git a/preview/webview.js b/preview/webview.js index 922b894..2dd8b07 100644 --- a/preview/webview.js +++ b/preview/webview.js @@ -59,8 +59,12 @@ async function init(state) { // Initialize the schematic. let root = document.querySelector('#schematic-root'); - simulator = new Simulator(blobUrl, saveState); - await simulator.init(root, state) + simulator = new Simulator({ + root: root, + schematicURL: blobUrl, + saveState: saveState, + }); + await simulator.setState(state) vscode.postMessage({ type: 'ready', }); diff --git a/src/preview.ts b/src/preview.ts index 8218152..f8b93e6 100644 --- a/src/preview.ts +++ b/src/preview.ts @@ -9,6 +9,7 @@ let boards = [ 'arduino-nano33', 'circuitplay-bluefruit', 'circuitplay-express', + 'gopher-badge', 'hifive1b', 'microbit', 'pinetime', @@ -111,7 +112,7 @@ async function createPanel(context: vscode.ExtensionContext, panel: vscode.Webvi // Also, the worker shouldn't be sending invalid styles anyway (if the // worker is hijacked, security is breached anyway). // More information: https://stackoverflow.com/questions/30653698/#31759553 - html = html.replace('{CSP}', `default-src 'none'; script-src ${panel.webview.cspSource} blob: 'unsafe-eval'; style-src ${panel.webview.cspSource} 'unsafe-inline'; connect-src ${panel.webview.cspSource}; font-src ${panel.webview.cspSource}`); + html = html.replace('{CSP}', `default-src ${panel.webview.cspSource}; script-src ${panel.webview.cspSource} blob: 'unsafe-eval'; style-src ${panel.webview.cspSource} 'unsafe-inline'; connect-src ${panel.webview.cspSource}`); panel.webview.html = html; // Wrapper postMessage that ignores messages after the panel is disposed. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy